summary refs log tree commit diff
path: root/src/libstd/rt/kill.rs
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-09-20 02:08:47 -0400
committerDaniel Micay <danielmicay@gmail.com>2013-10-09 09:17:29 -0400
commit6a90e80b6240d8213f2b99fa470ef6ee04552d1b (patch)
treee7ae38c849741fc9345652311dfa374f36b4be9a /src/libstd/rt/kill.rs
parentf647ccc79c38c1f80dbdb697900b2ba97e293263 (diff)
downloadrust-6a90e80b6240d8213f2b99fa470ef6ee04552d1b.tar.gz
rust-6a90e80b6240d8213f2b99fa470ef6ee04552d1b.zip
option: rewrite the API to use composition
Diffstat (limited to 'src/libstd/rt/kill.rs')
-rw-r--r--src/libstd/rt/kill.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/rt/kill.rs b/src/libstd/rt/kill.rs
index 09f99b9302e..6043ae318fe 100644
--- a/src/libstd/rt/kill.rs
+++ b/src/libstd/rt/kill.rs
@@ -486,10 +486,10 @@ impl KillHandle {
                     || {
                         // Prefer to check tombstones that were there first,
                         // being "more fair" at the expense of tail-recursion.
-                        others.take().map_move_default(true, |f| f()) && {
+                        others.take().map_default(true, |f| f()) && {
                             let mut inner = this.take().unwrap();
                             (!inner.any_child_failed) &&
-                                inner.child_tombstones.take().map_move_default(true, |f| f())
+                                inner.child_tombstones.take().map_default(true, |f| f())
                         }
                     }
                 }
@@ -508,7 +508,7 @@ impl KillHandle {
                     let others = Cell::new(other_tombstones); // :(
                     || {
                         // Prefer fairness to tail-recursion, as in above case.
-                        others.take().map_move_default(true, |f| f()) &&
+                        others.take().map_default(true, |f| f()) &&
                             f.take()()
                     }
                 }
@@ -577,7 +577,7 @@ impl Death {
         { use util; util::ignore(group); }
 
         // Step 1. Decide if we need to collect child failures synchronously.
-        do self.on_exit.take().map_move |on_exit| {
+        do self.on_exit.take().map |on_exit| {
             if success {
                 // We succeeded, but our children might not. Need to wait for them.
                 let mut inner = self.kill_handle.take_unwrap().unwrap();
@@ -585,7 +585,7 @@ impl Death {
                     success = false;
                 } else {
                     // Lockless access to tombstones protected by unwrap barrier.
-                    success = inner.child_tombstones.take().map_move_default(true, |f| f());
+                    success = inner.child_tombstones.take().map_default(true, |f| f());
                 }
             }
             on_exit(success);
@@ -594,12 +594,12 @@ impl Death {
         // Step 2. Possibly alert possibly-watching parent to failure status.
         // Note that as soon as parent_handle goes out of scope, the parent
         // can successfully unwrap its handle and collect our reported status.
-        do self.watching_parent.take().map_move |mut parent_handle| {
+        do self.watching_parent.take().map |mut parent_handle| {
             if success {
                 // Our handle might be None if we had an exit callback, and
                 // already unwrapped it. But 'success' being true means no
                 // child failed, so there's nothing to do (see below case).
-                do self.kill_handle.take().map_move |own_handle| {
+                do self.kill_handle.take().map |own_handle| {
                     own_handle.reparent_children_to(&mut parent_handle);
                 };
             } else {