about summary refs log tree commit diff
path: root/src/libsync
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2014-08-18 17:52:38 -0700
committerAaron Turon <aturon@mozilla.com>2014-08-28 09:12:54 -0700
commit276b8b125d3f60cebab702542b60207429fbb333 (patch)
tree022549e5a1b801df28b222d3bcd37194b997b849 /src/libsync
parent3a52ef4613f85fba1ecfd8746388bf34a5499bf9 (diff)
downloadrust-276b8b125d3f60cebab702542b60207429fbb333.tar.gz
rust-276b8b125d3f60cebab702542b60207429fbb333.zip
Fallout from stabilizing core::option
Diffstat (limited to 'src/libsync')
-rw-r--r--src/libsync/comm/oneshot.rs4
-rw-r--r--src/libsync/comm/sync.rs6
-rw-r--r--src/libsync/mpsc_queue.rs2
-rw-r--r--src/libsync/raw.rs4
4 files changed, 8 insertions, 8 deletions
diff --git a/src/libsync/comm/oneshot.rs b/src/libsync/comm/oneshot.rs
index 188bea83ac8..5b3cf33ebf0 100644
--- a/src/libsync/comm/oneshot.rs
+++ b/src/libsync/comm/oneshot.rs
@@ -107,7 +107,7 @@ impl<T: Send> Packet<T> {
             // Couldn't send the data, the port hung up first. Return the data
             // back up the stack.
             DISCONNECTED => {
-                Err(self.data.take_unwrap())
+                Err(self.data.take().unwrap())
             }
 
             // Not possible, these are one-use channels
@@ -244,7 +244,7 @@ impl<T: Send> Packet<T> {
             // There's data on the channel, so make sure we destroy it promptly.
             // This is why not using an arc is a little difficult (need the box
             // to stay valid while we take the data).
-            DATA => { self.data.take_unwrap(); }
+            DATA => { self.data.take().unwrap(); }
 
             // We're the only ones that can block on this port
             _ => unreachable!()
diff --git a/src/libsync/comm/sync.rs b/src/libsync/comm/sync.rs
index 1ee9fef1918..528a15cf6d7 100644
--- a/src/libsync/comm/sync.rs
+++ b/src/libsync/comm/sync.rs
@@ -347,7 +347,7 @@ impl<T: Send> Packet<T> {
         let waiter = match mem::replace(&mut state.blocker, NoneBlocked) {
             NoneBlocked => None,
             BlockedSender(task) => {
-                *state.canceled.take_unwrap() = true;
+                *state.canceled.take().unwrap() = true;
                 Some(task)
             }
             BlockedReceiver(..) => unreachable!(),
@@ -434,7 +434,7 @@ impl<T> Buffer<T> {
         let start = self.start;
         self.size -= 1;
         self.start = (self.start + 1) % self.buf.len();
-        self.buf.get_mut(start).take_unwrap()
+        self.buf.get_mut(start).take().unwrap()
     }
 
     fn size(&self) -> uint { self.size }
@@ -481,7 +481,7 @@ impl Queue {
         }
         unsafe {
             (*node).next = 0 as *mut Node;
-            Some((*node).task.take_unwrap())
+            Some((*node).task.take().unwrap())
         }
     }
 }
diff --git a/src/libsync/mpsc_queue.rs b/src/libsync/mpsc_queue.rs
index 012574808f3..ad2539fc260 100644
--- a/src/libsync/mpsc_queue.rs
+++ b/src/libsync/mpsc_queue.rs
@@ -122,7 +122,7 @@ impl<T: Send> Queue<T> {
                 *self.tail.get() = next;
                 assert!((*tail).value.is_none());
                 assert!((*next).value.is_some());
-                let ret = (*next).value.take_unwrap();
+                let ret = (*next).value.take().unwrap();
                 let _: Box<Node<T>> = mem::transmute(tail);
                 return Data(ret);
             }
diff --git a/src/libsync/raw.rs b/src/libsync/raw.rs
index c42d567fc18..ba6d0f03d83 100644
--- a/src/libsync/raw.rs
+++ b/src/libsync/raw.rs
@@ -259,7 +259,7 @@ impl<'a> Condvar<'a> {
             // signaller already sent -- I mean 'unconditionally' in contrast
             // with acquire().)
             (|| {
-                let _ = wait_end.take_unwrap().recv();
+                let _ = wait_end.take().unwrap().recv();
             }).finally(|| {
                 // Reacquire the condvar.
                 match self.order {
@@ -318,7 +318,7 @@ impl<'a> Condvar<'a> {
                               condvar_id,
                               "cond.signal_on()",
                               || {
-                queue.take_unwrap().broadcast()
+                queue.take().unwrap().broadcast()
             })
         }
     }