Skip to content

Commit

Permalink
Simplify wording
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Triplett <[email protected]>
Co-authored-by: Laurențiu Nicola <[email protected]>
  • Loading branch information
3 people authored Oct 9, 2021
1 parent 6a52fb7 commit fa5a212
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1334,9 +1334,9 @@ impl<T: Copy> From<Cow<'_, [T]>> for Box<[T]> {
/// Converts a `Cow<'_, [T]>` into a `Box<[T]>`
///
/// When `cow` is the `Cow::Borrowed` variant, this
/// conversion allocates on the heap and performs a copy of the
/// underlying slice. Otherwise, it will try to re-use the owned
/// vec's allocation.
/// conversion allocates on the heap and copies the
/// underlying slice. Otherwise, it will try to reuse the owned
/// `Vec`'s allocation.
#[inline]
fn from(cow: Cow<'_, [T]>) -> Box<[T]> {
match cow {
Expand Down Expand Up @@ -1372,7 +1372,7 @@ impl From<Cow<'_, str>> for Box<str> {
/// Converts a `Cow<'_, str>` into a `Box<str>`
///
/// When `cow` is the `Cow::Borrowed` variant, this
/// conversion allocates on the heap and performs a copy of the
/// conversion allocates on the heap and copies the
/// underlying `str`. Otherwise, it will try to re-use the owned
/// `String`'s allocation.
///
Expand Down

0 comments on commit fa5a212

Please sign in to comment.