Skip to content

Commit e5f0e23

Browse files
committed
---
yaml --- r: 30515 b: refs/heads/incoming c: 109055c h: refs/heads/master i: 30513: 070e45f 30511: e18522b v: v3
1 parent 504ca06 commit e5f0e23

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 7e5661214ad3cc00d40a993cf93b08f8db5d8cac
9+
refs/heads/incoming: 109055c7d3831f0a5a771e6f946e876dd8434223
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libcore/iter-trait.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ impl<A> IMPL_T<A>: iter::ExtendedIter<A> {
1818
pure fn foldl<B>(+b0: B, blk: fn(B, A) -> B) -> B {
1919
iter::foldl(self, move b0, blk)
2020
}
21+
pure fn position(f: fn(A) -> bool) -> Option<uint> {
22+
iter::position(self, f)
23+
}
2124
}
2225

2326
impl<A: Eq> IMPL_T<A>: iter::EqIter<A> {
2427
pure fn contains(x: A) -> bool { iter::contains(self, x) }
2528
pure fn count(x: A) -> uint { iter::count(self, x) }
26-
pure fn position(f: fn(A) -> bool) -> Option<uint> {
27-
iter::position(self, f)
28-
}
2929
}
3030

3131
impl<A: Copy> IMPL_T<A>: iter::CopyableIter<A> {

branches/incoming/src/libcore/iter.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ trait ExtendedIter<A> {
1313
pure fn all(blk: fn(A) -> bool) -> bool;
1414
pure fn any(blk: fn(A) -> bool) -> bool;
1515
pure fn foldl<B>(+b0: B, blk: fn(B, A) -> B) -> B;
16+
pure fn position(f: fn(A) -> bool) -> Option<uint>;
1617
}
1718

1819
trait EqIter<A:Eq> {
1920
pure fn contains(x: A) -> bool;
2021
pure fn count(x: A) -> uint;
21-
pure fn position(f: fn(A) -> bool) -> Option<uint>;
2222
}
2323

2424
trait Times {
@@ -142,7 +142,8 @@ pure fn count<A:Eq,IA:BaseIter<A>>(self: IA, x: A) -> uint {
142142
}
143143

144144
pure fn position<A,IA:BaseIter<A>>(self: IA, f: fn(A) -> bool)
145-
-> Option<uint> {
145+
-> Option<uint>
146+
{
146147
let mut i = 0;
147148
for self.each |a| {
148149
if f(a) { return Some(i); }

branches/incoming/src/libcore/vec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,14 +2019,14 @@ impl<A> &[A]: iter::ExtendedIter<A> {
20192019
pure fn foldl<B>(+b0: B, blk: fn(B, A) -> B) -> B {
20202020
iter::foldl(self, move b0, blk)
20212021
}
2022+
pure fn position(f: fn(A) -> bool) -> Option<uint> {
2023+
iter::position(self, f)
2024+
}
20222025
}
20232026

20242027
impl<A: Eq> &[A]: iter::EqIter<A> {
20252028
pure fn contains(x: A) -> bool { iter::contains(self, x) }
20262029
pure fn count(x: A) -> uint { iter::count(self, x) }
2027-
pure fn position(f: fn(A) -> bool) -> Option<uint> {
2028-
iter::position(self, f)
2029-
}
20302030
}
20312031

20322032
impl<A: Copy> &[A]: iter::CopyableIter<A> {

0 commit comments

Comments
 (0)