diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index ef70b364..8c08cca0 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -183,10 +183,11 @@ impl Deref for Array where U: ArraySize, { - type Target = U::ArrayType; + type Target = [T]; - fn deref(&self) -> &U::ArrayType { - &self.0 + #[inline] + fn deref(&self) -> &[T] { + self.0.as_ref() } } @@ -194,8 +195,9 @@ impl DerefMut for Array where U: ArraySize, { - fn deref_mut(&mut self) -> &mut U::ArrayType { - &mut self.0 + #[inline] + fn deref_mut(&mut self) -> &mut [T] { + self.0.as_mut() } } @@ -320,8 +322,6 @@ pub trait ArrayOps: + AsMut<[T; N]> + Borrow<[T; N]> + BorrowMut<[T; N]> - + Deref - + DerefMut + From<[T; N]> + Index + Index>