From af645e848713536ac3c0a0c52de7b4d96f96fbc6 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 3 Mar 2013 07:33:39 -0500 Subject: replace option::iter with a BaseIter impl --- src/libcore/task/spawn.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/libcore/task') diff --git a/src/libcore/task/spawn.rs b/src/libcore/task/spawn.rs index 152e602eeee..5a74e341116 100644 --- a/src/libcore/task/spawn.rs +++ b/src/libcore/task/spawn.rs @@ -268,7 +268,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) } @@ -317,7 +317,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); @@ -341,9 +341,7 @@ impl Drop for TCB { fn TCB(me: *rust_task, tasks: TaskGroupArc, ancestors: AncestorList, is_main: bool, notifier: Option) -> TCB { - - let notifier = notifier; - notifier.iter(|x| { x.failed = false; }); + for notifier.each |x| { x.failed = false; } TCB { me: me, -- cgit 1.4.1-3-g733a5