diff options
| author | bors <bors@rust-lang.org> | 2013-08-10 13:17:19 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-10 13:17:19 -0700 |
| commit | 8b9e1ce75a3e1416f2db80d30f65879fd902183f (patch) | |
| tree | 07b97a6ad0d382272a978018c71c5220cece8237 /src/libstd/task/spawn.rs | |
| parent | 2ba36ec62934c8b877766a6283633b6407c8d357 (diff) | |
| parent | c8a93efdae48b88bf594480705a5c0aac39c75e1 (diff) | |
| download | rust-8b9e1ce75a3e1416f2db80d30f65879fd902183f.tar.gz rust-8b9e1ce75a3e1416f2db80d30f65879fd902183f.zip | |
auto merge of #8430 : erickt/rust/cleanup-iterators, r=erickt
This PR does a bunch of cleaning up of various APIs. The major one is that it merges `Iterator` and `IteratorUtil`, and renames functions like `transform` into `map`. I also merged `DoubleEndedIterator` and `DoubleEndedIteratorUtil`, as well as I renamed various .consume* functions to .move_iter(). This helps to implement part of #7887.
Diffstat (limited to 'src/libstd/task/spawn.rs')
| -rw-r--r-- | src/libstd/task/spawn.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/task/spawn.rs b/src/libstd/task/spawn.rs index 1a38dfc3d88..10bac9325ab 100644 --- a/src/libstd/task/spawn.rs +++ b/src/libstd/task/spawn.rs @@ -79,7 +79,7 @@ use cast; use cell::Cell; use container::MutableMap; use comm::{Chan, GenericChan, oneshot}; -use hashmap::{HashSet, HashSetConsumeIterator}; +use hashmap::{HashSet, HashSetMoveIterator}; use local_data; use task::{Failure, SingleThreaded}; use task::{Success, TaskOpts, TaskResult}; @@ -141,8 +141,8 @@ impl TaskSet { assert!(was_present); } #[inline] - fn consume(self) -> HashSetConsumeIterator<TaskHandle> { - (*self).consume() + fn move_iter(self) -> HashSetMoveIterator<TaskHandle> { + (*self).move_iter() } } @@ -460,13 +460,13 @@ fn kill_taskgroup(state: TaskGroupInner, me: &TaskHandle, is_main: bool) { if newstate.is_some() { let TaskGroupData { members: members, descendants: descendants } = newstate.unwrap(); - for sibling in members.consume() { + for sibling in members.move_iter() { // Skip self - killing ourself won't do much good. if &sibling != me { RuntimeGlue::kill_task(sibling); } } - for child in descendants.consume() { + for child in descendants.move_iter() { assert!(&child != me); RuntimeGlue::kill_task(child); } |
