Skip to content

Commit e7f1598

Browse files
committed
---
yaml --- r: 157150 b: refs/heads/try c: a446b68 h: refs/heads/master v: v3
1 parent 1f1ec3f commit e7f1598

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 2d27bfaeb6522d386d0a2735cb3f75cc5707314a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: d44ea720fa9dfe062ef06d0eb49a58d4e7e92344
5-
refs/heads/try: fe6847a25ba6ebad42fefde7e3a2e6aa0794b676
5+
refs/heads/try: a446b68380f1f223b03baebb71d591d42c98dbbd
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 6601b0501e31d08d3892a2d5a7d8a57ab120bf75

branches/try/src/libcollections/vec.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,9 @@ impl<T> Vec<T> {
636636
}
637637
}
638638

639-
/// Shrinks the capacity of the vector as much as possible.
639+
/// Shrinks the capacity of the vector as much as possible. It will drop
640+
/// down as close as possible to the length but the allocator may still
641+
/// inform the vector that there is space for a few more elements.
640642
///
641643
/// # Example
642644
///
@@ -645,7 +647,7 @@ impl<T> Vec<T> {
645647
/// vec.push_all([1, 2, 3]);
646648
/// assert_eq!(vec.capacity(), 10);
647649
/// vec.shrink_to_fit();
648-
/// assert_eq!(vec.capacity(), 3);
650+
/// assert!(vec.capacity() >= 3);
649651
/// ```
650652
#[stable]
651653
pub fn shrink_to_fit(&mut self) {

0 commit comments

Comments
 (0)