Remove all uses of array_assume_init
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
This commit is contained in:
@@ -104,8 +104,7 @@ impl<T, const N: usize> IntoIter<T, N> {
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(array_into_iter_constructors)]
|
||||
///
|
||||
/// #![feature(maybe_uninit_array_assume_init)]
|
||||
/// #![feature(maybe_uninit_uninit_array_transpose)]
|
||||
/// #![feature(maybe_uninit_uninit_array)]
|
||||
/// use std::array::IntoIter;
|
||||
/// use std::mem::MaybeUninit;
|
||||
@@ -134,7 +133,7 @@ impl<T, const N: usize> IntoIter<T, N> {
|
||||
/// }
|
||||
///
|
||||
/// // SAFETY: We've initialized all N items
|
||||
/// unsafe { Ok(MaybeUninit::array_assume_init(buffer)) }
|
||||
/// unsafe { Ok(buffer.transpose().assume_init()) }
|
||||
/// }
|
||||
///
|
||||
/// let r: [_; 4] = next_chunk(&mut (10..16)).unwrap();
|
||||
|
||||
@@ -912,7 +912,7 @@ where
|
||||
|
||||
mem::forget(guard);
|
||||
// SAFETY: All elements of the array were populated in the loop above.
|
||||
let output = unsafe { MaybeUninit::array_assume_init(array) };
|
||||
let output = unsafe { array.transpose().assume_init() };
|
||||
Ok(Try::from_output(output))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user