diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 966e50b7..1293a8b3 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -585,6 +585,19 @@ pub trait SliceOps: + IndexMut + IndexMut> { + /// Splits the shared slice into a slice of `N`-element arrays. + /// + /// See [`slice_as_chunks`] for more information. + fn as_array_chunks(&self) -> (&[Array], &[T]) { + slice_as_chunks(self.as_ref()) + } + + /// Splits the exclusive slice into a slice of `N`-element arrays. + /// + /// See [`slice_as_chunks_mut`] for more information. + fn as_array_chunks_mut(&mut self) -> (&mut [Array], &mut [T]) { + slice_as_chunks_mut(self.as_mut()) + } } impl SliceOps for [T] {}