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>] {
1194
1194
/// Fills a slice with elements returned by calling a closure for each index.
1195
1195
///
1196
1196
/// 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
1198
1198
/// pass [`|_| Default::default()`][Default::default] as the argument.
1199
1199
///
1200
1200
/// # Panics
@@ -1353,7 +1353,7 @@ impl<T> [MaybeUninit<T>] {
1353
1353
/// use std::mem::MaybeUninit;
1354
1354
///
1355
1355
/// 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( );
1357
1357
/// uninit_bytes.write_copy_of_slice(&[0x12, 0x34, 0x56, 0x78]);
1358
1358
/// let vals = unsafe { uninit.assume_init_ref() };
1359
1359
/// if cfg!(target_endian = "little") {
You can’t perform that action at this time.
0 commit comments