about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorJacob Asper <jacobasper191@gmail.com>2024-02-25 02:41:54 -0500
committerJacob Asper <jacobasper191@gmail.com>2024-02-25 02:43:21 -0500
commit74151cbbf04477b646c7fcfd1db60f9c79c06081 (patch)
tree212a1c8e3f90f84f42ea15977df27f011e80f102 /library/alloc/src
parentbc52e5d4de4a41f41e9849e564c955ce3d1fe513 (diff)
downloadrust-74151cbbf04477b646c7fcfd1db60f9c79c06081.tar.gz
rust-74151cbbf04477b646c7fcfd1db60f9c79c06081.zip
Make push docs more vague
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/vec/mod.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index bd36b55d782..aaac911175d 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -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")]