Skip to content

Commit 36fff3c

Browse files
committed
---
yaml --- r: 56210 b: refs/heads/auto c: f43fc5f h: refs/heads/master v: v3
1 parent ee614e6 commit 36fff3c

File tree

4 files changed

+4
-38
lines changed

4 files changed

+4
-38
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: d29ef7ad255ba61a67047e8d3825feb3a6827444
17+
refs/heads/auto: f43fc5fff898d2c2d0b2a49ec35daf1005e76dd9
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libcore/iterator.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ 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 enumerate(self) -> EnumerateIterator<Self>;
2625
fn advance(&mut self, f: &fn(A) -> bool);
2726
}
2827

@@ -43,11 +42,6 @@ impl<A, T: Iterator<A>> IteratorUtil<A> for T {
4342
FilterIterator{iter: self, predicate: predicate}
4443
}
4544

46-
#[inline(always)]
47-
fn enumerate(self) -> EnumerateIterator<T> {
48-
EnumerateIterator{iter: self, count: 0}
49-
}
50-
5145
/// A shim implementing the `for` loop iteration protocol for iterator objects
5246
#[inline]
5347
fn advance(&mut self, f: &fn(A) -> bool) {
@@ -110,22 +104,3 @@ impl<'self, A, B, T: Iterator<A>> Iterator<B> for MapIterator<'self, A, B, T> {
110104
}
111105
}
112106
}
113-
114-
pub struct EnumerateIterator<T> {
115-
priv iter: T,
116-
priv count: uint
117-
}
118-
119-
impl<A, T: Iterator<A>> Iterator<(uint, A)> for EnumerateIterator<T> {
120-
#[inline]
121-
fn next(&mut self) -> Option<(uint, A)> {
122-
match self.iter.next() {
123-
Some(a) => {
124-
let ret = Some((self.count, a));
125-
self.count += 1;
126-
ret
127-
}
128-
_ => None
129-
}
130-
}
131-
}

branches/auto/src/libcore/task/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,9 @@ pub fn spawn_unlinked(f: ~fn()) {
466466
467467
pub fn spawn_supervised(f: ~fn()) {
468468
/*!
469-
* Creates a child task unlinked from the current one. If either this
470-
* task or the child task fails, the other will not be killed.
469+
* Creates a child task supervised by the current one. If the child
470+
* task fails, the parent will not be killed, but if the parent fails,
471+
* the child will be killed.
471472
*/
472473
473474
task().supervised().spawn(f)

branches/auto/src/libcore/vec.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4474,16 +4474,6 @@ mod tests {
44744474
i += 1;
44754475
}
44764476
}
4477-
4478-
#[test]
4479-
fn test_iterator_enumerate() {
4480-
use iterator::*;
4481-
let xs = [0u,1,2,3,4,5];
4482-
let mut it = xs.iter().enumerate();
4483-
for it.advance |(i, &x): (uint, &uint)| {
4484-
assert_eq!(i, x);
4485-
}
4486-
}
44874477
}
44884478

44894479
// Local Variables:

0 commit comments

Comments
 (0)