diff options
| author | Graydon Hoare <graydon@pobox.com> | 2012-10-30 10:30:35 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@pobox.com> | 2012-10-30 10:30:35 -0700 |
| commit | 9bcafa28aa7beadafd0994f09ad25b0dfc23f46e (patch) | |
| tree | 445f88483bdd948c91495c59d3934705ab5e85cc /src | |
| parent | dd76050e511ba367145b7debaac44687b9cdf9f1 (diff) | |
| parent | f938714be165cd3a783ee76608298e4f32a1edb0 (diff) | |
| download | rust-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.rs | 17 | ||||
| -rw-r--r-- | src/libcore/iter.rs | 4 | ||||
| -rw-r--r-- | src/libcore/uint-template.rs | 13 |
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 * |
