From 10089455287dcc3652b984ab4bfd6971e1b5f302 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 3 Aug 2013 12:45:23 -0400 Subject: remove obsolete `foreach` keyword this has been replaced by `for` --- src/libstd/task/local_data_priv.rs | 2 +- src/libstd/task/spawn.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libstd/task') diff --git a/src/libstd/task/local_data_priv.rs b/src/libstd/task/local_data_priv.rs index 69c4bb20caf..95d3cbaf89b 100644 --- a/src/libstd/task/local_data_priv.rs +++ b/src/libstd/task/local_data_priv.rs @@ -167,7 +167,7 @@ pub unsafe fn local_pop(handle: Handle, let map = get_local_map(handle); let key_value = key_to_key_value(key); - foreach entry in map.mut_iter() { + for entry in map.mut_iter() { match *entry { Some((k, _, loan)) if k == key_value => { if loan != NoLoan { diff --git a/src/libstd/task/spawn.rs b/src/libstd/task/spawn.rs index e6f115958fd..3bf2f255f57 100644 --- a/src/libstd/task/spawn.rs +++ b/src/libstd/task/spawn.rs @@ -299,7 +299,7 @@ fn each_ancestor(list: &mut AncestorList, // safe to skip it. This will leave our TaskHandle // hanging around in the group even after it's freed, // but that's ok because, by virtue of the group being - // dead, nobody will ever kill-all (foreach) over it.) + // dead, nobody will ever kill-all (for) over it.) if nobe_is_dead { true } else { forward_blk(tg_opt) } }; /*##########################################################* @@ -357,7 +357,7 @@ impl Drop for Taskgroup { // If we are failing, the whole taskgroup needs to die. do RuntimeGlue::with_task_handle_and_failing |me, failing| { if failing { - foreach x in this.notifier.mut_iter() { + for x in this.notifier.mut_iter() { x.failed = true; } // Take everybody down with us. @@ -387,7 +387,7 @@ pub fn Taskgroup(tasks: TaskGroupArc, ancestors: AncestorList, is_main: bool, mut notifier: Option) -> Taskgroup { - foreach x in notifier.mut_iter() { + for x in notifier.mut_iter() { x.failed = false; } @@ -465,13 +465,13 @@ fn kill_taskgroup(state: TaskGroupInner, me: &TaskHandle, is_main: bool) { if newstate.is_some() { let TaskGroupData { members: members, descendants: descendants } = newstate.unwrap(); - foreach sibling in members.consume() { + for sibling in members.consume() { // Skip self - killing ourself won't do much good. if &sibling != me { RuntimeGlue::kill_task(sibling); } } - foreach child in descendants.consume() { + for child in descendants.consume() { assert!(&child != me); RuntimeGlue::kill_task(child); } -- cgit 1.4.1-3-g733a5