diff options
| author | Frank Steffahn <frank.steffahn@stu.uni-kiel.de> | 2021-08-22 14:46:15 +0200 |
|---|---|---|
| committer | Frank Steffahn <frank.steffahn@stu.uni-kiel.de> | 2021-08-22 15:35:11 +0200 |
| commit | bf88b113eab9c36e63f8461f5849138cb60d810a (patch) | |
| tree | f333d6f75d1ec09c17554a69c6420ced3203adf2 /library/std/src | |
| parent | 2ad56d5c9031636c1509f4417e88099a49405b4e (diff) | |
| download | rust-bf88b113eab9c36e63f8461f5849138cb60d810a.tar.gz rust-bf88b113eab9c36e63f8461f5849138cb60d810a.zip | |
Fix typos “a”→“an”
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/collections/hash/map.rs | 6 | ||||
| -rw-r--r-- | library/std/src/ffi/c_str.rs | 4 | ||||
| -rw-r--r-- | library/std/src/ffi/os_str.rs | 8 | ||||
| -rw-r--r-- | library/std/src/net/addr.rs | 4 | ||||
| -rw-r--r-- | library/std/src/net/ip.rs | 6 | ||||
| -rw-r--r-- | library/std/src/os/unix/net/ancillary.rs | 4 | ||||
| -rw-r--r-- | library/std/src/os/windows/ffi.rs | 2 |
7 files changed, 17 insertions, 17 deletions
diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index 7e8da13239c..c999474a96f 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -1239,7 +1239,7 @@ pub struct IterMut<'a, K: 'a, V: 'a> { } impl<'a, K, V> IterMut<'a, K, V> { - /// Returns a iterator of references over the remaining items. + /// Returns an iterator of references over the remaining items. #[inline] pub(super) fn iter(&self) -> Iter<'_, K, V> { Iter { base: self.base.rustc_iter() } @@ -1268,7 +1268,7 @@ pub struct IntoIter<K, V> { } impl<K, V> IntoIter<K, V> { - /// Returns a iterator of references over the remaining items. + /// Returns an iterator of references over the remaining items. #[inline] pub(super) fn iter(&self) -> Iter<'_, K, V> { Iter { base: self.base.rustc_iter() } @@ -1371,7 +1371,7 @@ pub struct Drain<'a, K: 'a, V: 'a> { } impl<'a, K, V> Drain<'a, K, V> { - /// Returns a iterator of references over the remaining items. + /// Returns an iterator of references over the remaining items. #[inline] pub(super) fn iter(&self) -> Iter<'_, K, V> { Iter { base: self.base.rustc_iter() } diff --git a/library/std/src/ffi/c_str.rs b/library/std/src/ffi/c_str.rs index be7e099b73a..b9e0f0e271c 100644 --- a/library/std/src/ffi/c_str.rs +++ b/library/std/src/ffi/c_str.rs @@ -46,7 +46,7 @@ use crate::sys_common::memchr; /// /// # Extracting a raw pointer to the whole C string /// -/// `CString` implements a [`as_ptr`][`CStr::as_ptr`] method through the [`Deref`] +/// `CString` implements an [`as_ptr`][`CStr::as_ptr`] method through the [`Deref`] /// trait. This method will give you a `*const c_char` which you can /// feed directly to extern functions that expect a nul-terminated /// string, like C's `strdup()`. Notice that [`as_ptr`][`CStr::as_ptr`] returns a @@ -730,7 +730,7 @@ impl CString { /// ); /// ``` /// - /// A incorrectly formatted [`Vec`] will produce an error. + /// An incorrectly formatted [`Vec`] will produce an error. /// /// ``` /// #![feature(cstring_from_vec_with_nul)] diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index 8f4cd6c691c..397b35a84cf 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -359,7 +359,7 @@ impl OsString { #[stable(feature = "rust1", since = "1.0.0")] impl From<String> for OsString { - /// Converts a [`String`] into a [`OsString`]. + /// Converts a [`String`] into an [`OsString`]. /// /// This conversion does not allocate or copy memory. #[inline] @@ -880,7 +880,7 @@ impl From<Box<OsStr>> for OsString { #[stable(feature = "box_from_os_string", since = "1.20.0")] impl From<OsString> for Box<OsStr> { - /// Converts a [`OsString`] into a [`Box`]`<OsStr>` without copying or allocating. + /// Converts an [`OsString`] into a [`Box`]`<OsStr>` without copying or allocating. #[inline] fn from(s: OsString) -> Box<OsStr> { s.into_boxed_os_str() @@ -897,7 +897,7 @@ impl Clone for Box<OsStr> { #[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From<OsString> for Arc<OsStr> { - /// Converts a [`OsString`] into a [`Arc`]`<OsStr>` without copying or allocating. + /// Converts an [`OsString`] into a [`Arc`]`<OsStr>` without copying or allocating. #[inline] fn from(s: OsString) -> Arc<OsStr> { let arc = s.inner.into_arc(); @@ -916,7 +916,7 @@ impl From<&OsStr> for Arc<OsStr> { #[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From<OsString> for Rc<OsStr> { - /// Converts a [`OsString`] into a [`Rc`]`<OsStr>` without copying or allocating. + /// Converts an [`OsString`] into a [`Rc`]`<OsStr>` without copying or allocating. #[inline] fn from(s: OsString) -> Rc<OsStr> { let rc = s.inner.into_rc(); diff --git a/library/std/src/net/addr.rs b/library/std/src/net/addr.rs index d3569710c2b..43d930677fa 100644 --- a/library/std/src/net/addr.rs +++ b/library/std/src/net/addr.rs @@ -561,8 +561,8 @@ impl From<SocketAddrV6> for SocketAddr { impl<I: Into<IpAddr>> From<(I, u16)> for SocketAddr { /// Converts a tuple struct (Into<[`IpAddr`]>, `u16`) into a [`SocketAddr`]. /// - /// This conversion creates a [`SocketAddr::V4`] for a [`IpAddr::V4`] - /// and creates a [`SocketAddr::V6`] for a [`IpAddr::V6`]. + /// This conversion creates a [`SocketAddr::V4`] for an [`IpAddr::V4`] + /// and creates a [`SocketAddr::V6`] for an [`IpAddr::V6`]. /// /// `u16` is treated as port of the newly created [`SocketAddr`]. fn from(pieces: (I, u16)) -> SocketAddr { diff --git a/library/std/src/net/ip.rs b/library/std/src/net/ip.rs index ac92cfe19cd..4165a7beaa8 100644 --- a/library/std/src/net/ip.rs +++ b/library/std/src/net/ip.rs @@ -380,7 +380,7 @@ impl IpAddr { matches!(self, IpAddr::V6(_)) } - /// Converts this address to an `IpAddr::V4` if it is a IPv4-mapped IPv6 addresses, otherwise it + /// Converts this address to an `IpAddr::V4` if it is an IPv4-mapped IPv6 addresses, otherwise it /// return `self` as-is. /// /// # Examples @@ -1621,8 +1621,8 @@ impl Ipv6Addr { } } - /// Converts this address to an `IpAddr::V4` if it is a IPv4-mapped addresses, otherwise it - /// returns self wrapped in a `IpAddr::V6`. + /// Converts this address to an `IpAddr::V4` if it is an IPv4-mapped addresses, otherwise it + /// returns self wrapped in an `IpAddr::V6`. /// /// # Examples /// diff --git a/library/std/src/os/unix/net/ancillary.rs b/library/std/src/os/unix/net/ancillary.rs index cd429d14269..1f9d42812ec 100644 --- a/library/std/src/os/unix/net/ancillary.rs +++ b/library/std/src/os/unix/net/ancillary.rs @@ -279,7 +279,7 @@ pub enum AncillaryData<'a> { } impl<'a> AncillaryData<'a> { - /// Create a `AncillaryData::ScmRights` variant. + /// Create an `AncillaryData::ScmRights` variant. /// /// # Safety /// @@ -291,7 +291,7 @@ impl<'a> AncillaryData<'a> { AncillaryData::ScmRights(scm_rights) } - /// Create a `AncillaryData::ScmCredentials` variant. + /// Create an `AncillaryData::ScmCredentials` variant. /// /// # Safety /// diff --git a/library/std/src/os/windows/ffi.rs b/library/std/src/os/windows/ffi.rs index c89b9ff1efa..8d29fa7d66f 100644 --- a/library/std/src/os/windows/ffi.rs +++ b/library/std/src/os/windows/ffi.rs @@ -30,7 +30,7 @@ //! [`OsString`] is the Rust wrapper for owned strings in the //! preferred representation of the operating system. On Windows, //! this struct gets augmented with an implementation of the -//! [`OsStringExt`] trait, which has a [`OsStringExt::from_wide`] method. This +//! [`OsStringExt`] trait, which has an [`OsStringExt::from_wide`] method. This //! lets you create an [`OsString`] from a `&[u16]` slice; presumably //! you get such a slice out of a `WCHAR` Windows API. //! |
