about summary refs log tree commit diff
path: root/src/libcore/task.rs
diff options
context:
space:
mode:
authorBen Blum <bblum@andrew.cmu.edu>2012-08-07 14:26:03 -0400
committerBen Blum <bblum@andrew.cmu.edu>2012-08-07 14:26:41 -0400
commit18ac4a8e6d8db5ac8902bef504e220e0cd372cd1 (patch)
treeb960e0f94404119c95121c1cddadb881a3c74a51 /src/libcore/task.rs
parentae6d84f573a802ff3606d59a52155380220b3c87 (diff)
Change task().future_result's argument mode
Diffstat (limited to 'src/libcore/task.rs')
-rw-r--r--src/libcore/task.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/task.rs b/src/libcore/task.rs
index 06f3c0b2f50..c066e7d6f51 100644
--- a/src/libcore/task.rs
+++ b/src/libcore/task.rs
@@ -271,7 +271,7 @@ impl task_builder for task_builder {
      * # Failure
      * Fails if a future_result was already set for this task.
      */
-    fn future_result(blk: fn(-future::future<task_result>)) -> task_builder {
+    fn future_result(blk: fn(+future::future<task_result>)) -> task_builder {
         // FIXME (#1087, #1857): Once linked failure and notification are
         // handled in the library, I can imagine implementing this by just
         // registering an arbitrary number of task::on_exit handlers and
@@ -394,7 +394,7 @@ impl task_builder for task_builder {
         let ch = comm::chan(po);
         let mut result = none;
 
-        do self.future_result(|-r| { result = some(r); }).spawn {
+        do self.future_result(|+r| { result = some(r); }).spawn {
             comm::send(ch, f());
         }
         match future::get(option::unwrap(result)) {
@@ -1684,11 +1684,11 @@ fn test_add_wrapper() {
 #[ignore(cfg(windows))]
 fn test_future_result() {
     let mut result = none;
-    do task().future_result(|-r| { result = some(r); }).spawn { }
+    do task().future_result(|+r| { result = some(r); }).spawn { }
     assert future::get(option::unwrap(result)) == success;
 
     result = none;
-    do task().future_result(|-r| { result = some(r); }).unlinked().spawn {
+    do task().future_result(|+r| { result = some(r); }).unlinked().spawn {
         fail;
     }
     assert future::get(option::unwrap(result)) == failure;
@@ -1696,7 +1696,7 @@ fn test_future_result() {
 
 #[test] #[should_fail] #[ignore(cfg(windows))]
 fn test_back_to_the_future_result() {
-    let _ = task().future_result(|-r| ()).future_result(|-r| ());
+    let _ = task().future_result(util::ignore).future_result(util::ignore);
 }
 
 #[test]