about summary refs log tree commit diff
path: root/src/libcore/task/spawn.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-03-05 02:06:50 -0800
committerbors <bors@rust-lang.org>2013-03-05 02:06:50 -0800
commiteddefbc893f16ddec44dbb6b5be6adf7d84c2b53 (patch)
tree4977e2930f39129932167c5ba7fe90cee0d3e684 /src/libcore/task/spawn.rs
parent75c5bc90d2d3fb3e495b38c49c7cc96797795c72 (diff)
parentaf645e848713536ac3c0a0c52de7b4d96f96fbc6 (diff)
downloadrust-eddefbc893f16ddec44dbb6b5be6adf7d84c2b53.tar.gz
rust-eddefbc893f16ddec44dbb6b5be6adf7d84c2b53.zip
auto merge of #5212 : thestinger/rust/iter, r=graydon
A small step towards fixing #2827
Diffstat (limited to 'src/libcore/task/spawn.rs')
-rw-r--r--src/libcore/task/spawn.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libcore/task/spawn.rs b/src/libcore/task/spawn.rs
index 74384ee3d93..75b38d07ece 100644
--- a/src/libcore/task/spawn.rs
+++ b/src/libcore/task/spawn.rs
@@ -266,7 +266,7 @@ fn each_ancestor(list:        &mut AncestorList,
                  * Step 3: Maybe unwind; compute return info for our caller.
                  *##########################################################*/
                 if need_unwind && !nobe_is_dead {
-                    do bail_opt.iter |bail_blk| {
+                    for bail_opt.each |bail_blk| {
                         do with_parent_tg(&mut nobe.parent_group) |tg_opt| {
                             (*bail_blk)(tg_opt)
                         }
@@ -315,7 +315,7 @@ impl Drop for TCB {
         unsafe {
             // If we are failing, the whole taskgroup needs to die.
             if rt::rust_task_is_unwinding(self.me) {
-                self.notifier.iter(|x| { x.failed = true; });
+                for self.notifier.each |x| { x.failed = true; }
                 // Take everybody down with us.
                 do access_group(&self.tasks) |tg| {
                     kill_taskgroup(tg, self.me, self.is_main);
@@ -339,9 +339,7 @@ impl Drop for TCB {
 
 fn TCB(me: *rust_task, tasks: TaskGroupArc, ancestors: AncestorList,
        is_main: bool, notifier: Option<AutoNotify>) -> TCB {
-
-    let notifier = notifier;
-    notifier.iter(|x| { x.failed = false; });
+    for notifier.each |x| { x.failed = false; }
 
     TCB {
         me: me,