diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-11-21 17:23:21 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-11-26 08:25:27 -0800 |
| commit | f571e46ddb696d15a8cc912309714ca74f23dcc4 (patch) | |
| tree | 836e1185e797d57993b2149ee262e8ffc09f6a7f /src/libstd/task | |
| parent | 8ceb374ab783c6417b60867e7f34bebe997936ac (diff) | |
| download | rust-f571e46ddb696d15a8cc912309714ca74f23dcc4.tar.gz rust-f571e46ddb696d15a8cc912309714ca74f23dcc4.zip | |
test: Remove non-procedure uses of `do` from compiletest, libstd tests,
compile-fail tests, run-fail tests, and run-pass tests.
Diffstat (limited to 'src/libstd/task')
| -rw-r--r-- | src/libstd/task/mod.rs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/libstd/task/mod.rs b/src/libstd/task/mod.rs index 85f66d4ada8..189f1436d42 100644 --- a/src/libstd/task/mod.rs +++ b/src/libstd/task/mod.rs @@ -477,9 +477,9 @@ fn test_unnamed_task() { do run_in_uv_task { do spawn { - do with_task_name |name| { + with_task_name(|name| { assert!(name.is_none()); - } + }) } } } @@ -492,9 +492,9 @@ fn test_owned_named_task() { let mut t = task(); t.name(~"ada lovelace"); do t.spawn { - do with_task_name |name| { + with_task_name(|name| { assert!(name.unwrap() == "ada lovelace"); - } + }) } } } @@ -507,9 +507,9 @@ fn test_static_named_task() { let mut t = task(); t.name("ada lovelace"); do t.spawn { - do with_task_name |name| { + with_task_name(|name| { assert!(name.unwrap() == "ada lovelace"); - } + }) } } } @@ -522,9 +522,9 @@ fn test_send_named_task() { let mut t = task(); t.name("ada lovelace".into_send_str()); do t.spawn { - do with_task_name |name| { + with_task_name(|name| { assert!(name.unwrap() == "ada lovelace"); - } + }) } } } @@ -606,9 +606,9 @@ fn test_try_fail() { #[cfg(test)] fn get_sched_id() -> int { - do Local::borrow |sched: &mut ::rt::sched::Scheduler| { + Local::borrow(|sched: &mut ::rt::sched::Scheduler| { sched.sched_id() as int - } + }) } #[test] @@ -666,7 +666,7 @@ fn test_spawn_sched_blocking() { // Testing that a task in one scheduler can block in foreign code // without affecting other schedulers - do 20u.times { + 20u.times(|| { let (start_po, start_ch) = stream(); let (fin_po, fin_ch) = stream(); @@ -713,7 +713,7 @@ fn test_spawn_sched_blocking() { lock.unlock(); fin_po.recv(); lock.destroy(); - } + }) } } @@ -740,21 +740,21 @@ fn test_avoid_copying_the_body_spawn() { #[test] fn test_avoid_copying_the_body_task_spawn() { - do avoid_copying_the_body |f| { + avoid_copying_the_body(|f| { let builder = task(); do builder.spawn || { f(); } - } + }) } #[test] fn test_avoid_copying_the_body_try() { - do avoid_copying_the_body |f| { + avoid_copying_the_body(|f| { do try || { f() }; - } + }) } #[test] |
