Skip to content

Commit f0c9fcc

Browse files
committed
more doc improvements
1 parent 91a79e0 commit f0c9fcc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

library/alloc/src/vec/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,11 +1023,11 @@ impl<T, A: Allocator> Vec<T, A> {
10231023

10241024
/// Shrinks the capacity of the vector as much as possible.
10251025
///
1026-
/// The behavior of this method depends on the allocator being used. If the allocator supports
1027-
/// in-place shrinking, some or all of the excess capacity may be returned to the allocator.
1028-
/// If not, this method may cause the vector's data to be copied to a new allocation, although
1029-
/// no guarantees are given that this new allocation is actually smaller. See
1030-
/// [`Allocator::shrink`] for more details.
1026+
/// The behavior of this method depends on the allocator, which may either shrink the vector
1027+
/// in-place or reallocate. The resulting vector might still have some excess capacity, just as
1028+
/// is the case for [`with_capacity`]. See [`Allocator::shrink`] for more details.
1029+
///
1030+
/// [`with_capacity`]: Vec::with_capacity
10311031
///
10321032
/// # Examples
10331033
///

0 commit comments

Comments
 (0)