From 1eca34de7dd55719cd83153994e5caf2027f62a2 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 20 Nov 2013 14:17:12 -0800 Subject: libstd: Remove all non-`proc` uses of `do` from libstd --- src/libstd/task/mod.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/libstd/task') diff --git a/src/libstd/task/mod.rs b/src/libstd/task/mod.rs index 485fe9edf0e..85f66d4ada8 100644 --- a/src/libstd/task/mod.rs +++ b/src/libstd/task/mod.rs @@ -432,12 +432,12 @@ pub fn with_task_name(blk: |Option<&str>| -> U) -> U { use rt::task::Task; if in_green_task_context() { - do Local::borrow |task: &mut Task| { + Local::borrow(|task: &mut Task| { match task.name { Some(ref name) => blk(Some(name.as_slice())), None => blk(None) } - } + }) } else { fail!("no task name exists in non-green task context") } @@ -459,9 +459,7 @@ pub fn failing() -> bool { use rt::task::Task; - do Local::borrow |local: &mut Task| { - local.unwinder.unwinding - } + Local::borrow(|local: &mut Task| local.unwinder.unwinding) } // The following 8 tests test the following 2^3 combinations: -- cgit 1.4.1-3-g733a5