From cc1503dfef505662199d1cc8736805031a96f0bf Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Sun, 14 Jul 2024 14:42:26 +1000 Subject: [PATCH] Remove unused trait bounds and derives --- src/disjoint_mut.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/disjoint_mut.rs b/src/disjoint_mut.rs index 3e3425e91..ad24683d8 100644 --- a/src/disjoint_mut.rs +++ b/src/disjoint_mut.rs @@ -443,7 +443,7 @@ impl> DisjointMut { pub fn slice_as<'a, I, V>(&'a self, index: I) -> DisjointImmutGuard<'a, T, [V]> where I: SliceBounds, - V: FromBytes + Sized, + V: FromBytes, { let slice = self.index(index.mul(mem::size_of::())).cast_slice(); self.check_cast_slice_len(index, &slice); @@ -477,7 +477,7 @@ impl> DisjointMut { #[cfg_attr(debug_assertions, track_caller)] pub fn element_as<'a, V>(&'a self, index: usize) -> DisjointImmutGuard<'a, T, V> where - V: FromBytes + Sized, + V: FromBytes, { self.index((index..index + 1).mul(mem::size_of::())) .cast() @@ -557,7 +557,7 @@ impl TranslateRange for (RangeFrom, RangeTo) { } } -#[derive(Clone, Default, PartialEq, Eq, Hash)] +#[derive(Clone, Default, PartialEq, Eq)] pub struct Bounds { /// A [`Range::end`]` == `[`usize::MAX`] is considered unbounded, /// as lengths need to be less than [`isize::MAX`] already. @@ -608,7 +608,7 @@ impl From for Bounds { } } -pub trait SliceBounds: TranslateRange + Into + Clone + Debug { +pub trait SliceBounds: TranslateRange + Clone { fn to_range(&self, len: usize) -> Range; }