Skip to content

Commit 5d2db64

Browse files
committed
---
yaml --- r: 57013 b: refs/heads/try c: 962a753 h: refs/heads/master i: 57011: 78c94a0 v: v3
1 parent 3023951 commit 5d2db64

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
5-
refs/heads/try: 0f85cf180a430c066d5b86db0998d124f8dff03b
5+
refs/heads/try: 962a753890f801c378b3cb244b7d7ca3cae164a5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libcore/iterator.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ pub trait IteratorUtil<A> {
2222
// FIXME: #5898: should be called map
2323
fn transform<'r, B>(self, f: &'r fn(A) -> B) -> MapIterator<'r, A, B, Self>;
2424
fn filter<'r>(self, predicate: &'r fn(&A) -> bool) -> FilterIterator<'r, A, Self>;
25-
fn dropwhile<'r>(self, predicate: &'r fn(&A) -> bool) -> DropWhileIterator<'r, A, Self>;
26-
fn takewhile<'r>(self, predicate: &'r fn(&A) -> bool) -> TakeWhileIterator<'r, A, Self>;
25+
fn skip_while<'r>(self, predicate: &'r fn(&A) -> bool) -> SkipWhileIterator<'r, A, Self>;
26+
fn take_while<'r>(self, predicate: &'r fn(&A) -> bool) -> TakeWhileIterator<'r, A, Self>;
2727
fn skip(self, n: uint) -> SkipIterator<Self>;
2828
fn take(self, n: uint) -> TakeIterator<Self>;
2929
fn enumerate(self) -> EnumerateIterator<Self>;
@@ -53,12 +53,12 @@ impl<A, T: Iterator<A>> IteratorUtil<A> for T {
5353
}
5454

5555
#[inline(always)]
56-
fn dropwhile<'r>(self, predicate: &'r fn(&A) -> bool) -> DropWhileIterator<'r, A, T> {
57-
DropWhileIterator{iter: self, flag: false, predicate: predicate}
56+
fn skip_while<'r>(self, predicate: &'r fn(&A) -> bool) -> SkipWhileIterator<'r, A, T> {
57+
SkipWhileIterator{iter: self, flag: false, predicate: predicate}
5858
}
5959

6060
#[inline(always)]
61-
fn takewhile<'r>(self, predicate: &'r fn(&A) -> bool) -> TakeWhileIterator<'r, A, T> {
61+
fn take_while<'r>(self, predicate: &'r fn(&A) -> bool) -> TakeWhileIterator<'r, A, T> {
6262
TakeWhileIterator{iter: self, flag: false, predicate: predicate}
6363
}
6464

@@ -154,13 +154,13 @@ impl<A, T: Iterator<A>> Iterator<(uint, A)> for EnumerateIterator<T> {
154154
}
155155
}
156156

157-
pub struct DropWhileIterator<'self, A, T> {
157+
pub struct SkipWhileIterator<'self, A, T> {
158158
priv iter: T,
159159
priv flag: bool,
160160
priv predicate: &'self fn(&A) -> bool
161161
}
162162

163-
impl<'self, A, T: Iterator<A>> Iterator<A> for DropWhileIterator<'self, A, T> {
163+
impl<'self, A, T: Iterator<A>> Iterator<A> for SkipWhileIterator<'self, A, T> {
164164
#[inline]
165165
fn next(&mut self) -> Option<A> {
166166
let mut next = self.iter.next();

0 commit comments

Comments
 (0)