diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-08-13 19:06:57 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-08-13 19:08:02 -0700 |
| commit | 36883186ab88e7b39ea2cb0f47c2c8999840663e (patch) | |
| tree | fd27a1819bd110cc11977286adb7b033197470e1 /src/libcore/task.rs | |
| parent | bc6eaf2acba7f71422e0540b0abbb7828f00b68f (diff) | |
| download | rust-36883186ab88e7b39ea2cb0f47c2c8999840663e.tar.gz rust-36883186ab88e7b39ea2cb0f47c2c8999840663e.zip | |
De-mode core::future.
Diffstat (limited to 'src/libcore/task.rs')
| -rw-r--r-- | src/libcore/task.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/task.rs b/src/libcore/task.rs index 244feb3f713..230e9173dcb 100644 --- a/src/libcore/task.rs +++ b/src/libcore/task.rs @@ -409,7 +409,7 @@ impl task_builder { do self.future_result(|+r| { result = some(r); }).spawn { comm::send(ch, f()); } - match future::get(option::unwrap(result)) { + match future::get(&option::unwrap(result)) { success => result::ok(comm::recv(po)), failure => result::err(()) } @@ -1704,13 +1704,13 @@ fn test_add_wrapper() { fn test_future_result() { let mut result = none; do task().future_result(|+r| { result = some(r); }).spawn { } - assert future::get(option::unwrap(result)) == success; + assert future::get(&option::unwrap(result)) == success; result = none; do task().future_result(|+r| { result = some(r); }).unlinked().spawn { fail; } - assert future::get(option::unwrap(result)) == failure; + assert future::get(&option::unwrap(result)) == failure; } #[test] #[should_fail] #[ignore(cfg(windows))] |
