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 3f3299c commit 37b29bdCopy full SHA for 37b29bd
[refs]
@@ -1,5 +1,5 @@
1
---
2
-refs/heads/master: 3962dec67cc8f48b47c7efce29416144365d772c
+refs/heads/master: 0ca369e9dc5f6ea0ba0c38d047e8d931badfc82c
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
trunk/src/libcore/vec.rs
@@ -895,9 +895,8 @@ pub fn retain<T>(v: &mut ~[T], f: pure fn(t: &T) -> bool) {
895
}
896
897
898
- while deleted > 0 {
899
- v.pop();
900
- deleted -= 1;
+ if deleted > 0 {
+ v.truncate(len - deleted);
901
902
903
0 commit comments