Skip to content

Commit

Permalink
Fixed some _i32 notation in maybe_uninit’s doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Elarcis committed Nov 12, 2022
1 parent 8ef2485 commit d8c0fef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ impl<T> MaybeUninit<T> {
/// #![feature(maybe_uninit_as_bytes, maybe_uninit_slice)]
/// use std::mem::MaybeUninit;
///
/// let val = 0x12345678i32;
/// let val = 0x12345678_i32;
/// let uninit = MaybeUninit::new(val);
/// let uninit_bytes = uninit.as_bytes();
/// let bytes = unsafe { MaybeUninit::slice_assume_init_ref(uninit_bytes) };
Expand All @@ -1198,7 +1198,7 @@ impl<T> MaybeUninit<T> {
/// #![feature(maybe_uninit_as_bytes)]
/// use std::mem::MaybeUninit;
///
/// let val = 0x12345678i32;
/// let val = 0x12345678_i32;
/// let mut uninit = MaybeUninit::new(val);
/// let uninit_bytes = uninit.as_bytes_mut();
/// if cfg!(target_endian = "little") {
Expand Down

0 comments on commit d8c0fef

Please sign in to comment.