diff options
Diffstat (limited to 'src/libstd/num/uint_macros.rs')
| -rw-r--r-- | src/libstd/num/uint_macros.rs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs index acf7ea683fb..aa01b871b9d 100644 --- a/src/libstd/num/uint_macros.rs +++ b/src/libstd/num/uint_macros.rs @@ -126,12 +126,6 @@ pub fn range_step_inclusive(start: $T, last: $T, step: $T_SIGNED, it: &fn($T) -> } #[inline] -/// Iterate over the range [`lo`..`hi`) -pub fn range(lo: $T, hi: $T, it: &fn($T) -> bool) -> bool { - range_step(lo, hi, 1 as $T_SIGNED, it) -} - -#[inline] /// Iterate over the range (`hi`..`lo`] pub fn range_rev(hi: $T, lo: $T, it: &fn($T) -> bool) -> bool { if hi == min_value { return true; } @@ -660,9 +654,6 @@ mod tests { pub fn test_ranges() { let mut l = ~[]; - for range(0,3) |i| { - l.push(i); - } for range_rev(14,11) |i| { l.push(i); } @@ -685,8 +676,7 @@ mod tests { l.push(i); } - assert_eq!(l, ~[0,1,2, - 13,12,11, + assert_eq!(l, ~[13,12,11, 20,22,24, 36,34,32, max_value-2, @@ -695,9 +685,6 @@ mod tests { min_value+3,min_value+1]); // None of the `fail`s should execute. - for range(0,0) |_i| { - fail!("unreachable"); - } for range_rev(0,0) |_i| { fail!("unreachable"); } |
