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
@@ -1146,7 +1146,7 @@ unsafe fn to_handle_mut(x: *const Self) -> Self::HandleMut {
/// 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>;
+1 -1
View File
@@ -1743,7 +1743,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
#[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.
+1 -1
View File
@@ -958,7 +958,7 @@ fn from(s: &CStr) -> 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());
+1 -1
View File
@@ -916,7 +916,7 @@ fn from(s: &OsStr) -> 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();