Merge pull request #3881 from vertexclique/incoming
Removing iter::TimesIx
This commit is contained in:
commit
9bcafa28aa
@ -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
|
||||
*
|
||||
|
@ -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];
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user