Skip to content

Commit 587a750

Browse files
committed
---
yaml --- r: 42417 b: refs/heads/try c: 0ca369e h: refs/heads/master i: 42415: 83f6cd6 v: v3
1 parent 04ccf85 commit 587a750

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
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: 19dfec2aaf746535de1521f68421f9980dbf25de
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5-
refs/heads/try: 3962dec67cc8f48b47c7efce29416144365d772c
5+
refs/heads/try: 0ca369e9dc5f6ea0ba0c38d047e8d931badfc82c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/libcore/vec.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,9 +895,8 @@ pub fn retain<T>(v: &mut ~[T], f: pure fn(t: &T) -> bool) {
895895
}
896896
}
897897

898-
while deleted > 0 {
899-
v.pop();
900-
deleted -= 1;
898+
if deleted > 0 {
899+
v.truncate(len - deleted);
901900
}
902901
}
903902

0 commit comments

Comments
 (0)