Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing iter::TimesIx #3881

Merged
merged 2 commits into from
Oct 30, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/libcore/int-template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
4 changes: 0 additions & 4 deletions src/libcore/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
13 changes: 0 additions & 13 deletions src/libcore/uint-template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down