diff --git a/src/libstd/iterator.rs b/src/libstd/iterator.rs index 1be398966bbeb..33505213082ca 100644 --- a/src/libstd/iterator.rs +++ b/src/libstd/iterator.rs @@ -1266,6 +1266,8 @@ impl> Iterator for Skip { let lower = lower.saturating_sub(self.n); let upper = match upper { + // if uint::max_value, leave it there + Some(x) if x == uint::max_value => Some(x), Some(x) => Some(x.saturating_sub(self.n)), None => None };