diff --git a/objc2/src/rc/id_traits.rs b/objc2/src/rc/id_traits.rs index b8be107c1..f2cb54900 100644 --- a/objc2/src/rc/id_traits.rs +++ b/objc2/src/rc/id_traits.rs @@ -16,10 +16,7 @@ pub trait SliceId { } /// Helper trait for functionality on slices containing owned [`Id`]s. -pub trait SliceIdMut { - /// The type of the items in the slice. - type Item; - +pub trait SliceIdMut: SliceId { /// Convert a mutable slice of mutable [`Id`]s into a mutable slice of /// mutable references. fn as_mut_slice_mut(&mut self) -> &mut [&mut Self::Item]; @@ -44,8 +41,6 @@ impl SliceId for [Id] { } impl SliceIdMut for [Id] { - type Item = T; - fn as_mut_slice_mut(&mut self) -> &mut [&mut T] { let ptr = self as *mut Self as *mut [&mut T]; // SAFETY: Id and &mut T have the same memory layout, and the