Skip to content

Commit abb8aae

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163259 b: refs/heads/snap-stage3 c: e2724cb h: refs/heads/master i: 163257: a0a4af5 163255: 584079f v: v3
1 parent 496ba18 commit abb8aae

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 0cfdc99c71f132f967cf968e5b2c9d20adf14b46
4+
refs/heads/snap-stage3: e2724cb1d53b368e6a18571f345f08a0dd2644c9
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libcore/iter.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ pub trait IteratorExt<A>: Iterator<A> {
283283
/// ```
284284
#[inline]
285285
#[unstable = "waiting for unboxed closures, may want to require peek"]
286-
fn take_while<'r>(self, predicate: |&A|: 'r -> bool) -> TakeWhile<'r, A, Self> {
286+
fn take_while<P>(self, predicate: P) -> TakeWhile<A, Self, P> where P: FnMut(&A) -> bool {
287287
TakeWhile{iter: self, flag: false, predicate: predicate}
288288
}
289289

@@ -1674,14 +1674,14 @@ impl<A, I, P> Iterator<A> for SkipWhile<A, I, P> where I: Iterator<A>, P: FnMut(
16741674
/// An iterator which only accepts elements while `predicate` is true
16751675
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
16761676
#[stable]
1677-
pub struct TakeWhile<'a, A, T> {
1678-
iter: T,
1677+
pub struct TakeWhile<A, I, P> where I: Iterator<A>, P: FnMut(&A) -> bool {
1678+
iter: I,
16791679
flag: bool,
1680-
predicate: |&A|: 'a -> bool
1680+
predicate: P,
16811681
}
16821682

16831683
#[unstable = "trait is unstable"]
1684-
impl<'a, A, T: Iterator<A>> Iterator<A> for TakeWhile<'a, A, T> {
1684+
impl<A, I, P> Iterator<A> for TakeWhile<A, I, P> where I: Iterator<A>, P: FnMut(&A) -> bool {
16851685
#[inline]
16861686
fn next(&mut self) -> Option<A> {
16871687
if self.flag {

0 commit comments

Comments
 (0)