]> git.lizzy.rs Git - rust.git/commitdiff
Removing iter::TimesIx
authorMahmut Bulut <mahmutbulut0@gmail.com>
Sun, 28 Oct 2012 20:36:01 +0000 (22:36 +0200)
committerMahmut Bulut <mahmutbulut0@gmail.com>
Sun, 28 Oct 2012 20:36:01 +0000 (22:36 +0200)
src/libcore/int-template.rs
src/libcore/uint-template.rs

index 5a2b054dd3e83de1790d3e7ac650d8eb16097ef5..a25231c88505a080fc1838311c3b57617e004d9e 100644 (file)
@@ -98,23 +98,6 @@ impl T: iter::Times {
     }
 }
 
-impl T: iter::TimesIx {
-    #[inline(always)]
-    /// Like `times`, but provides an index
-    pure fn timesi(it: fn(uint) -> bool) {
-        let slf = self as uint;
-        if slf < 0u {
-            fail fmt!("The .timesi method expects a nonnegative number, \
-                       but found %?", self);
-        }
-        let mut i = 0u;
-        while i < slf {
-            if !it(i) { break }
-            i += 1u;
-        }
-    }
-}
-
 /**
  * Parse a buffer of bytes
  *
index 3199262ae163f3e48753a4a2275e69c88b8c748f..bdce82f4dd330d0e1a14c47d3c64b794df23ace3 100644 (file)
@@ -88,19 +88,6 @@ impl T: iter::Times {
     }
 }
 
-impl T: iter::TimesIx {
-    #[inline(always)]
-    /// Like `times`, but with an index, `eachi`-style.
-    pure fn timesi(it: fn(uint) -> bool) {
-        let slf = self as uint;
-        let mut i = 0u;
-        while i < slf {
-            if !it(i) { break }
-            i += 1u;
-        }
-    }
-}
-
 /**
  * Parse a buffer of bytes
  *