We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84637e6 commit 4cdbb8cCopy full SHA for 4cdbb8c
library/alloc/src/vec.rs
@@ -243,8 +243,8 @@ use crate::raw_vec::RawVec;
243
/// * It would penalize the general case, incurring an additional branch
244
/// on every access.
245
///
246
-/// `Vec` will never automatically shrink itself, even if completely empty. This
247
-/// ensures no unnecessary allocations or deallocations occur. Emptying a `Vec`
+/// `Vec` will not automatically shrink itself, even if completely empty, when doing so
+/// would cause unnecessary allocations or deallocations to occur. Emptying a `Vec`
248
/// and then filling it back up to the same [`len`] should incur no calls to
249
/// the allocator. If you wish to free up unused memory, use
250
/// [`shrink_to_fit`].
0 commit comments