Skip to content

Commit 74151cb

Browse files
committed
Make push docs more vague
1 parent bc52e5d commit 74151cb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

library/alloc/src/vec/mod.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1922,10 +1922,9 @@ impl<T, A: Allocator> Vec<T, A> {
19221922
/// # Time complexity
19231923
///
19241924
/// Takes amortized *O*(1) time. If the vector's length would exceed its
1925-
/// capacity after the push, the capacity is doubled by allocating
1926-
/// *O*(*capacity*) space, then *O*(*capacity*) time to copy the vector's
1927-
/// elements. This expensive operation is offset by the *capacity* *O*(1)
1928-
/// insertions it allows.
1925+
/// capacity after the push, *O*(*capacity*) time is taken to copy the
1926+
/// vector's elements to a larger allocation. This expensive operation is
1927+
/// offset by the *capacity* *O*(1) insertions it allows.
19291928
#[cfg(not(no_global_oom_handling))]
19301929
#[inline]
19311930
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)