diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-27 21:42:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-27 21:42:30 +0100 |
| commit | eab81297f756135d1d7bc9c34b7a7f53003f0bee (patch) | |
| tree | dc87d7d7ab36997c9e06489820ae0babda696b09 /library/std | |
| parent | 052eab54eccbd116c7cdfc631136bbc5a2bb0426 (diff) | |
| parent | 7a3a668bc92eef153973dca63b38f8d620d461b9 (diff) | |
| download | rust-eab81297f756135d1d7bc9c34b7a7f53003f0bee.tar.gz rust-eab81297f756135d1d7bc9c34b7a7f53003f0bee.zip | |
Rollup merge of #92307 - hiroshi-maybe:fix-minor-typos, r=camelid
Fix minor typos
Diffstat (limited to 'library/std')
| -rw-r--r-- | library/std/src/io/readbuf.rs | 4 | ||||
| -rw-r--r-- | library/std/src/net/ip.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 d84a500e078..c655bc88930 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<u8>]) -> 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/library/std/src/net/ip.rs b/library/std/src/net/ip.rs index da95fe21ac9..4029125a375 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. |
