File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -1749,14 +1749,12 @@ impl<A: Add<A, A> + Ord + Clone> Iterator<A> for Range<A> {
1749
1749
// Blocked on #8605 Need numeric trait for converting to `Option<uint>`
1750
1750
}
1751
1751
1752
- impl < A : Sub < A , A > + Integer + Ord + Clone > DoubleEndedIterator < A > for Range < A > {
1752
+ /// `Integer` is required to ensure the range will be the same regardless of
1753
+ /// the direction it is consumed.
1754
+ impl < A : Integer + Ord + Clone > DoubleEndedIterator < A > for Range < A > {
1753
1755
#[ inline]
1754
1756
fn next_back ( & mut self ) -> Option < A > {
1755
1757
if self . stop > self . state {
1756
- // Integer doesn't technically define this rule, but we're going to assume that every
1757
- // Integer is reachable from every other one by adding or subtracting enough Ones. This
1758
- // seems like a reasonable-enough rule that every Integer should conform to, even if it
1759
- // can't be statically checked.
1760
1758
self . stop = self . stop - self . one ;
1761
1759
Some ( self . stop . clone ( ) )
1762
1760
} else {
You can’t perform that action at this time.
0 commit comments