File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1194,7 +1194,7 @@ impl<T> [MaybeUninit<T>] {
11941194 /// Fills a slice with elements returned by calling a closure for each index.
11951195 ///
11961196 /// This method uses a closure to create new values. If you'd rather `Clone` a given value, use
1197- /// [`MaybeUninit::fill` ]. If you want to use the `Default` trait to generate values, you can
1197+ /// [slice::write_filled ]. If you want to use the `Default` trait to generate values, you can
11981198 /// pass [`|_| Default::default()`][Default::default] as the argument.
11991199 ///
12001200 /// # Panics
@@ -1353,7 +1353,7 @@ impl<T> [MaybeUninit<T>] {
13531353 /// use std::mem::MaybeUninit;
13541354 ///
13551355 /// let mut uninit = [MaybeUninit::<u16>::uninit(), MaybeUninit::<u16>::uninit()];
1356- /// let uninit_bytes = MaybeUninit::slice_as_bytes_mut(&mut uninit);
1356+ /// let uninit_bytes = uninit.as_bytes_mut( );
13571357 /// uninit_bytes.write_copy_of_slice(&[0x12, 0x34, 0x56, 0x78]);
13581358 /// let vals = unsafe { uninit.assume_init_ref() };
13591359 /// if cfg!(target_endian = "little") {
You can’t perform that action at this time.
0 commit comments