Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor typos #92307

Merged
merged 2 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion library/std/src/net/ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ impl fmt::Display for Ipv6Addr {
}
}
} else {
// Slow path: write the address to a local buffer, the use f.pad.
// Slow path: write the address to a local buffer, then use f.pad.
// Defined recursively by using the fast path to write to the
// buffer.

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