Skip to content

Commit

Permalink
fix typo: intialized -> initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshi-maybe committed Dec 27, 2021
1 parent 7ddad34 commit 7a3a668
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions library/std/src/io/readbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl<'a> ReadBuf<'a> {

/// Creates a new `ReadBuf` from a fully uninitialized buffer.
///
/// Use `assume_init` if part of the buffer is known to be already inintialized.
/// Use `assume_init` if part of the buffer is known to be already initialized.
#[inline]
pub fn uninit(buf: &'a mut [MaybeUninit<u8>]) -> ReadBuf<'a> {
ReadBuf { buf, filled: 0, initialized: 0 }
Expand Down Expand Up @@ -145,7 +145,7 @@ impl<'a> ReadBuf<'a> {
byte.write(0);
}

// SAFETY: we just inintialized uninit bytes, and the previous bytes were already init
// SAFETY: we just initialized uninit bytes, and the previous bytes were already init
unsafe {
self.assume_init(n);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![feature(rustc_attrs)]

// Test to ensure that we can handle cases where
// let statements create no bindings are intialized
// let statements create no bindings are initialized
// using a Place expression
//
// Note: Currently when feature `capture_disjoint_fields` is enabled
Expand Down

0 comments on commit 7a3a668

Please sign in to comment.