diff options
| author | Frank Steffahn <frank.steffahn@stu.uni-kiel.de> | 2021-08-22 18:15:49 +0200 |
|---|---|---|
| committer | Frank Steffahn <frank.steffahn@stu.uni-kiel.de> | 2021-08-22 18:15:49 +0200 |
| commit | 2f9ddf3bc7cfa79d272b1409be80905be946d831 (patch) | |
| tree | a88f54853c40da892b1da6ae223176df5ba6469b /library/std/src | |
| parent | 2396fad0950980cd3bf53bc825cdfa79ec7fd85f (diff) | |
Fix typos “an”→“a” and a few different ones that appeared in the same search
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/ffi/mod.rs | 2 | ||||
| -rw-r--r-- | library/std/src/io/mod.rs | 2 | ||||
| -rw-r--r-- | library/std/src/keyword_docs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/windows/stdio.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys_common/wtf8.rs | 2 | ||||
| -rw-r--r-- | library/std/src/time/monotonic.rs | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/library/std/src/ffi/mod.rs b/library/std/src/ffi/mod.rs index 0b7dc256db8..fe4e3af91ad 100644 --- a/library/std/src/ffi/mod.rs +++ b/library/std/src/ffi/mod.rs @@ -94,7 +94,7 @@ //! //! * [`OsStr`] represents a borrowed reference to a string in a //! format that can be passed to the operating system. It can be -//! converted into an UTF-8 Rust string slice in a similar way to +//! converted into a UTF-8 Rust string slice in a similar way to //! [`OsString`]. //! //! # Conversions diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index fa073d080c6..28254fea0d3 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -1150,7 +1150,7 @@ impl<'a> DerefMut for IoSliceMut<'a> { /// A buffer type used with `Write::write_vectored`. /// -/// It is semantically a wrapper around an `&[u8]`, but is guaranteed to be +/// It is semantically a wrapper around a `&[u8]`, but is guaranteed to be /// ABI compatible with the `iovec` type on Unix platforms and `WSABUF` on /// Windows. #[stable(feature = "iovec", since = "1.36.0")] diff --git a/library/std/src/keyword_docs.rs b/library/std/src/keyword_docs.rs index 605bd33a4bf..749a441d182 100644 --- a/library/std/src/keyword_docs.rs +++ b/library/std/src/keyword_docs.rs @@ -2289,7 +2289,7 @@ mod dyn_keyword {} /// } /// /// let mut u = IntOrFloat { f: 1.0 }; -/// // Reading the fields of an union is always unsafe +/// // Reading the fields of a union is always unsafe /// assert_eq!(unsafe { u.i }, 1065353216); /// // Updating through any of the field will modify all of them /// u.i = 1073741824; diff --git a/library/std/src/sys/windows/stdio.rs b/library/std/src/sys/windows/stdio.rs index 1cf0e9f0cf1..6f2618c63b5 100644 --- a/library/std/src/sys/windows/stdio.rs +++ b/library/std/src/sys/windows/stdio.rs @@ -162,7 +162,7 @@ impl io::Read for Stdin { } let mut utf16_buf = [0u16; MAX_BUFFER_SIZE / 2]; - // In the worst case, an UTF-8 string can take 3 bytes for every `u16` of an UTF-16. So + // In the worst case, a UTF-8 string can take 3 bytes for every `u16` of a UTF-16. So // we can read at most a third of `buf.len()` chars and uphold the guarantee no data gets // lost. let amount = cmp::min(buf.len() / 3, utf16_buf.len()); diff --git a/library/std/src/sys_common/wtf8.rs b/library/std/src/sys_common/wtf8.rs index 1bd3cfd2200..9508bd7da59 100644 --- a/library/std/src/sys_common/wtf8.rs +++ b/library/std/src/sys_common/wtf8.rs @@ -785,7 +785,7 @@ pub fn is_code_point_boundary(slice: &Wtf8, index: usize) -> bool { /// Copied from core::str::raw::slice_unchecked #[inline] pub unsafe fn slice_unchecked(s: &Wtf8, begin: usize, end: usize) -> &Wtf8 { - // memory layout of an &[u8] and &Wtf8 are the same + // memory layout of a &[u8] and &Wtf8 are the same Wtf8::from_bytes_unchecked(slice::from_raw_parts(s.bytes.as_ptr().add(begin), end - begin)) } diff --git a/library/std/src/time/monotonic.rs b/library/std/src/time/monotonic.rs index 27fee6acff3..fa96b7abff6 100644 --- a/library/std/src/time/monotonic.rs +++ b/library/std/src/time/monotonic.rs @@ -84,7 +84,7 @@ pub mod inner { pub(super) fn monotonize(raw: time::Instant) -> time::Instant { let delta = raw.checked_sub_instant(&ZERO).unwrap(); // Split into seconds and nanos since Duration doesn't have a - // constructor that takes an u128 + // constructor that takes a u128 let secs = delta.as_secs() as u128; let nanos = delta.subsec_nanos() as u128; let timestamp: u128 = secs << 64 | nanos; |
