From 7ddad349b188c9ae29ca63baf5fb1d5dfbe2d0bb Mon Sep 17 00:00:00 2001 From: Hiroshi Kori Date: Sun, 26 Dec 2021 16:03:17 -0800 Subject: [PATCH 1/2] fix typo: the use f.pad -> then use f.pad --- library/std/src/net/ip.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/net/ip.rs b/library/std/src/net/ip.rs index da95fe21ac9a..4029125a375d 100644 --- a/library/std/src/net/ip.rs +++ b/library/std/src/net/ip.rs @@ -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. From 7a3a668bc92eef153973dca63b38f8d620d461b9 Mon Sep 17 00:00:00 2001 From: Hiroshi Kori Date: Sun, 26 Dec 2021 16:20:38 -0800 Subject: [PATCH 2/2] fix typo: intialized -> initialized --- library/std/src/io/readbuf.rs | 4 ++-- src/test/ui/closures/2229_closure_analysis/wild_patterns.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/std/src/io/readbuf.rs b/library/std/src/io/readbuf.rs index d84a500e0780..c655bc889308 100644 --- a/library/std/src/io/readbuf.rs +++ b/library/std/src/io/readbuf.rs @@ -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]) -> ReadBuf<'a> { ReadBuf { buf, filled: 0, initialized: 0 } @@ -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); } diff --git a/src/test/ui/closures/2229_closure_analysis/wild_patterns.rs b/src/test/ui/closures/2229_closure_analysis/wild_patterns.rs index 7843c251666c..a795088a1d94 100644 --- a/src/test/ui/closures/2229_closure_analysis/wild_patterns.rs +++ b/src/test/ui/closures/2229_closure_analysis/wild_patterns.rs @@ -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