Skip to content

Commit fa5a212

Browse files
timClicksjoshtriplettlnicola
authored
Simplify wording
Co-authored-by: Josh Triplett <[email protected]> Co-authored-by: Laurențiu Nicola <[email protected]>
1 parent 6a52fb7 commit fa5a212

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/alloc/src/boxed.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1334,9 +1334,9 @@ impl<T: Copy> From<Cow<'_, [T]>> for Box<[T]> {
13341334
/// Converts a `Cow<'_, [T]>` into a `Box<[T]>`
13351335
///
13361336
/// When `cow` is the `Cow::Borrowed` variant, this
1337-
/// conversion allocates on the heap and performs a copy of the
1338-
/// underlying slice. Otherwise, it will try to re-use the owned
1339-
/// vec's allocation.
1337+
/// conversion allocates on the heap and copies the
1338+
/// underlying slice. Otherwise, it will try to reuse the owned
1339+
/// `Vec`'s allocation.
13401340
#[inline]
13411341
fn from(cow: Cow<'_, [T]>) -> Box<[T]> {
13421342
match cow {
@@ -1372,7 +1372,7 @@ impl From<Cow<'_, str>> for Box<str> {
13721372
/// Converts a `Cow<'_, str>` into a `Box<str>`
13731373
///
13741374
/// When `cow` is the `Cow::Borrowed` variant, this
1375-
/// conversion allocates on the heap and performs a copy of the
1375+
/// conversion allocates on the heap and copies the
13761376
/// underlying `str`. Otherwise, it will try to re-use the owned
13771377
/// `String`'s allocation.
13781378
///

0 commit comments

Comments
 (0)