From ea9c5c405ecea256721c6d65b7de21bffe21056b Mon Sep 17 00:00:00 2001 From: blake2-ppc Date: Sun, 4 Aug 2013 17:10:09 +0200 Subject: std: Remove uint::iterate, replaced by `range` --- src/libstd/num/uint.rs | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'src/libstd/num') diff --git a/src/libstd/num/uint.rs b/src/libstd/num/uint.rs index 275a72d6ecc..86bc98e53fc 100644 --- a/src/libstd/num/uint.rs +++ b/src/libstd/num/uint.rs @@ -70,30 +70,6 @@ pub fn div_round(x: uint, y: uint) -> uint { /// pub fn div_floor(x: uint, y: uint) -> uint { return x / y; } -/// -/// Iterate over the range [`lo`..`hi`), or stop when requested -/// -/// # Arguments -/// -/// * lo - The integer at which to start the loop (included) -/// * hi - The integer at which to stop the loop (excluded) -/// * it - A block to execute with each consecutive integer of the range. -/// Return `true` to continue, `false` to stop. -/// -/// # Return value -/// -/// `true` If execution proceeded correctly, `false` if it was interrupted, -/// that is if `it` returned `false` at any point. -/// -pub fn iterate(lo: uint, hi: uint, it: &fn(uint) -> bool) -> bool { - let mut i = lo; - while i < hi { - if (!it(i)) { return false; } - i += 1u; - } - return true; -} - impl iter::Times for uint { #[inline] /// -- cgit 1.4.1-3-g733a5