Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Stone <cuviper@gmail.com>
  • Loading branch information
the8472 and cuviper committed Jan 26, 2024
1 parent e561d06 commit 57009e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2796,7 +2796,7 @@ impl<T, I: SliceIndex<[T]>, A: Allocator> IndexMut<I> for Vec<T, A> {
///
/// # Allocation behavior
///
/// In general `Vec` does not guarantee any particular grow/allocation stategy.
/// In general `Vec` does not guarantee any particular growth or allocation strategy.
/// That also applies to this trait impl.
///
/// **Note:** This section covers implementation details and is therefore exempt from
Expand All @@ -2817,9 +2817,9 @@ impl<T, I: SliceIndex<[T]>, A: Allocator> IndexMut<I> for Vec<T, A> {
/// this can lead to the large allocations having their lifetimes unnecessarily extended which
/// can result in increased memory footprint.
///
/// In cases where this is an issue the excess capacity can be discard with [`Vec::shrink_to()`],
/// [`Vec::shrink_to_fit()`] or by collecting into [`Box<[T]>`][owned slice] instead which additionally reduces
/// the size of the longlived struct.
/// In cases where this is an issue, the excess capacity can be discarded with [`Vec::shrink_to()`],
/// [`Vec::shrink_to_fit()`] or by collecting into [`Box<[T]>`][owned slice] instead, which additionally reduces
/// the size of the long-lived struct.
///
/// [owned slice]: Box
///
Expand Down

0 comments on commit 57009e1

Please sign in to comment.