File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 6189e99c8605578aae841be6fba9e27bfbad97fc
2
+ refs/heads/master: f0404c39f272868c1dedc7cda7b0b6dffcb5713d
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5
5
refs/heads/try: 649d35e4d830b27806705dc5352c86ab6d6fd1a1
Original file line number Diff line number Diff line change @@ -1130,7 +1130,11 @@ impl<I> RandomAccessIterator for Rev<I> where I: DoubleEndedIterator + RandomAcc
1130
1130
#[ inline]
1131
1131
fn idx ( & mut self , index : usize ) -> Option < <I as Iterator >:: Item > {
1132
1132
let amt = self . indexable ( ) ;
1133
- self . iter . idx ( amt - index - 1 )
1133
+ if amt > index {
1134
+ self . iter . idx ( amt - index - 1 )
1135
+ } else {
1136
+ None
1137
+ }
1134
1138
}
1135
1139
}
1136
1140
You can’t perform that action at this time.
0 commit comments