Skip to content

Commit ddea06f

Browse files
committed
Fix uses of removed deprecated methods
1 parent 606d564 commit ddea06f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/mem/maybe_uninit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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+
/// [`MaybeUninit::write_filled`][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") {

0 commit comments

Comments
 (0)