Skip to content

Commit

Permalink
Make push docs more vague
Browse files Browse the repository at this point in the history
  • Loading branch information
20jasper committed Feb 25, 2024
1 parent bc52e5d commit 74151cb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1922,10 +1922,9 @@ impl<T, A: Allocator> Vec<T, A> {
/// # Time complexity
///
/// Takes amortized *O*(1) time. If the vector's length would exceed its
/// capacity after the push, the capacity is doubled by allocating
/// *O*(*capacity*) space, then *O*(*capacity*) time to copy the vector's
/// elements. This expensive operation is offset by the *capacity* *O*(1)
/// insertions it allows.
/// capacity after the push, *O*(*capacity*) time is taken to copy the
/// vector's elements to a larger allocation. This expensive operation is
/// offset by the *capacity* *O*(1) insertions it allows.
#[cfg(not(no_global_oom_handling))]
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down

0 comments on commit 74151cb

Please sign in to comment.