no_std
This commit is contained in:
parent
c0e915f1b4
commit
00261d95c1
9 changed files with 102 additions and 96 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue