unsafe fn slice_remove<T>(slice: &mut [MaybeUninit<T>], idx: usize) -> T {
    let len = slice.len();
    debug_assert!(idx < len);
    let slice_ptr = slice.as_mut_ptr();
    let ret = (*slice_ptr.add(idx)).assume_init_read();
    ptr::copy(slice_ptr.add(idx + 1), slice_ptr.add(idx), len - idx - 1);
    ret
}
/// Removes and returns a value from a slice of all initialized elements, leaving behind one
/// trailing uninitialized element.
///
/// # Safety
/// The slice has more than `idx` elements.
Removes and returns a value from a slice of all initialized elements, leaving behind one
trailing uninitialized element.
Removes and returns a value from a slice of all initialized elements leaving behind one trailing uninitialized element .
unsafe fn slice_remove<T>(slice: &mut [MaybeUninit<T>], idx: usize) -> T {
    let len = slice.len();
    debug_assert!(idx < len);
    let slice_ptr = slice.as_mut_ptr();
    let ret = (*slice_ptr.add(idx)).assume_init_read();
    ptr::copy(slice_ptr.add(idx + 1), slice_ptr.add(idx), len - idx - 1);
    ret
}
unsafe fn slice_remove < T > ( slice : & mut [ MaybeUninit < T > ] , idx : usize ) -> T { let len = slice . len ( ) ; debug_assert ! ( idx len ) ; let slice_ptr = slice . as_mut_ptr ( ) ; let ret = ( * slice_ptr . add ( idx ) ) . assume_init_read ( ) ; ptr :: copy ( slice_ptr . add ( idx + 1 ) , slice_ptr . add ( idx ) , len - idx - 1 ) ; ret }
Removes and returns a value from a slice of all initialized elements, leaving behind one
trailing uninitialized element.
Removes and returns a value from a slice of all initialized elements leaving behind one trailing uninitialized element .
slice
&mut [MaybeUninit<T>]
idx
usize
slice
&mut [MaybeUninit<T>]
idx
usize
safety
The slice has more than `idx` elements.
The slice has more than ` idx ` elements .