1
0
Fork 0
This commit is contained in:
Paul-Nicolas Madelaine 2025-11-17 22:07:04 +01:00
parent c0e915f1b4
commit 00261d95c1
9 changed files with 102 additions and 96 deletions

View file

@ -1,6 +1,6 @@
use std::iter::ExactSizeIterator;
use std::iter::FusedIterator;
use std::mem::MaybeUninit;
use core::iter::ExactSizeIterator;
use core::iter::FusedIterator;
use core::mem::MaybeUninit;
#[derive(Clone)]
pub(crate) struct ArrayVec<T: Copy, const N: usize> {
@ -37,7 +37,7 @@ impl<T: Copy, const N: usize> ArrayVec<T, N> {
}
#[inline]
pub(crate) fn as_slice_mut(&mut self) -> &mut [T] {
unsafe { std::mem::transmute::<_, &mut [T]>(self.array.get_unchecked_mut(0..self.len)) }
unsafe { core::mem::transmute::<_, &mut [T]>(self.array.get_unchecked_mut(0..self.len)) }
}
}
impl<'l, T: Copy, const N: usize> IntoIterator for &'l ArrayVec<T, N> {