Fix typo “a Rc” → “an Rc”

This commit is contained in:
Frank Steffahn 2021-08-22 12:33:27 +02:00
parent a49e38e672
commit 04fa1d81dd
4 changed files with 4 additions and 4 deletions

View File

@ -1146,7 +1146,7 @@ pub type VecRef<T, U = T> = OwningRef<Vec<T>, U>;
/// Typedef of an owning reference that uses a `String` as the owner.
pub type StringRef = OwningRef<String, str>;
/// Typedef of an owning reference that uses a `Rc` as the owner.
/// Typedef of an owning reference that uses an `Rc` as the owner.
pub type RcRef<T, U = T> = OwningRef<Rc<T>, U>;
/// Typedef of an owning reference that uses an `Arc` as the owner.
pub type ArcRef<T, U = T> = OwningRef<Arc<T>, U>;

View File

@ -1743,7 +1743,7 @@ impl<T: ?Sized> fmt::Pointer for Rc<T> {
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "from_for_ptrs", since = "1.6.0")]
impl<T> From<T> for Rc<T> {
/// Converts a generic type `T` into a `Rc<T>`
/// Converts a generic type `T` into an `Rc<T>`
///
/// The conversion allocates on the heap and moves `t`
/// from the stack into it.

View File

@ -958,7 +958,7 @@ impl From<&CStr> for Arc<CStr> {
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl From<CString> for Rc<CStr> {
/// Converts a [`CString`] into a [`Rc`]`<CStr>` without copying or allocating.
/// Converts a [`CString`] into an [`Rc`]`<CStr>` without copying or allocating.
#[inline]
fn from(s: CString) -> Rc<CStr> {
let rc: Rc<[u8]> = Rc::from(s.into_inner());

View File

@ -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 an [`OsString`] into a [`Rc`]`<OsStr>` without copying or allocating.
/// Converts an [`OsString`] into an [`Rc`]`<OsStr>` without copying or allocating.
#[inline]
fn from(s: OsString) -> Rc<OsStr> {
let rc = s.inner.into_rc();