Skip to content

Commit 026bdaa

Browse files
committed
---
yaml --- r: 188321 b: refs/heads/master c: eadc8a7 h: refs/heads/master i: 188319: 6bc8f41 v: v3
1 parent c4c56ff commit 026bdaa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 6d6038a1944394fc5e64048aea6fdbad4f59ee15
2+
refs/heads/master: eadc8a7b45b6897640c44b14e81c2c272d364bb7
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
55
refs/heads/try: 649d35e4d830b27806705dc5352c86ab6d6fd1a1

trunk/src/libcore/iter.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,10 +728,11 @@ pub trait IteratorExt: Iterator + Sized {
728728
P: FnMut(Self::Item) -> bool,
729729
Self: ExactSizeIterator + DoubleEndedIterator
730730
{
731-
let mut i = self.len() - 1;
731+
let mut i = self.len();
732+
732733
while let Some(v) = self.next_back() {
733734
if predicate(v) {
734-
return Some(i);
735+
return Some(i - 1);
735736
}
736737
i -= 1;
737738
}

0 commit comments

Comments
 (0)