about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@pobox.com>2012-10-30 10:30:35 -0700
committerGraydon Hoare <graydon@pobox.com>2012-10-30 10:30:35 -0700
commit9bcafa28aa7beadafd0994f09ad25b0dfc23f46e (patch)
tree445f88483bdd948c91495c59d3934705ab5e85cc /src
parentdd76050e511ba367145b7debaac44687b9cdf9f1 (diff)
parentf938714be165cd3a783ee76608298e4f32a1edb0 (diff)
downloadrust-9bcafa28aa7beadafd0994f09ad25b0dfc23f46e.tar.gz
rust-9bcafa28aa7beadafd0994f09ad25b0dfc23f46e.zip
Merge pull request #3881 from vertexclique/incoming
Removing iter::TimesIx
Diffstat (limited to 'src')
-rw-r--r--src/libcore/int-template.rs17
-rw-r--r--src/libcore/iter.rs4
-rw-r--r--src/libcore/uint-template.rs13
3 files changed, 0 insertions, 34 deletions
diff --git a/src/libcore/int-template.rs b/src/libcore/int-template.rs
index 5a2b054dd3e..a25231c8850 100644
--- a/src/libcore/int-template.rs
+++ b/src/libcore/int-template.rs
@@ -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
  *
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index f79a2e8f17b..bb28d0ef4fb 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -34,10 +34,6 @@ pub trait Times {
     pure fn times(it: fn() -> bool);
 }
 
-pub trait TimesIx{
-    pure fn timesi(it: fn(uint) -> bool);
-}
-
 pub trait CopyableIter<A:Copy> {
     pure fn filter_to_vec(pred: fn(a: A) -> bool) -> ~[A];
     pure fn map_to_vec<B>(op: fn(v: A) -> B) -> ~[B];
diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs
index 3199262ae16..bdce82f4dd3 100644
--- a/src/libcore/uint-template.rs
+++ b/src/libcore/uint-template.rs
@@ -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
  *