diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-11-20 14:17:12 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-11-26 08:23:57 -0800 |
| commit | 1eca34de7dd55719cd83153994e5caf2027f62a2 (patch) | |
| tree | 14ba2903a9ead6e569d08a33c9ebfc2c6ba07e9e /src/libstd/task | |
| parent | 6801bc8f552ce740deb60212903ba43de197689c (diff) | |
| download | rust-1eca34de7dd55719cd83153994e5caf2027f62a2.tar.gz rust-1eca34de7dd55719cd83153994e5caf2027f62a2.zip | |
libstd: Remove all non-`proc` uses of `do` from libstd
Diffstat (limited to 'src/libstd/task')
| -rw-r--r-- | src/libstd/task/mod.rs | 8 |
1 files changed, 3 insertions, 5 deletions
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<U>(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: |
