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 c0b4440 commit b270e7fCopy full SHA for b270e7f
src/libcore/iter/range.rs
@@ -285,7 +285,7 @@ impl<A: Step> Iterator for ops::Range<A> {
285
// NOTE: the safety of `unsafe impl TrustedLen` depends on this being correct!
286
match Step::steps_between(&self.start, &self.end) {
287
Some(hint) => (hint, Some(hint)),
288
- None => (0, None)
+ None => (usize::MAX, None)
289
}
290
291
@@ -410,7 +410,7 @@ impl<A: Step> Iterator for ops::RangeInclusive<A> {
410
411
412
Some(hint) => (hint.saturating_add(1), hint.checked_add(1)),
413
- None => (0, None),
+ None => (usize::MAX, None),
414
415
416
0 commit comments