Closed wolfnether closed 1 year ago
impl<T: Default, const S: usize> Array for [T; S] { type Item = T; const CAPACITY: usize = S; #[inline(always)] #[must_use] fn as_slice(&self) -> &[T] { &*self } #[inline(always)] #[must_use] fn as_slice_mut(&mut self) -> &mut [T] { &mut *self } #[inline(always)] fn default() -> Self { [(); S].map(|_| T::default()) } }