From 276b8b125d3f60cebab702542b60207429fbb333 Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Mon, 18 Aug 2014 17:52:38 -0700 Subject: Fallout from stabilizing core::option --- src/libsync/comm/oneshot.rs | 4 ++-- src/libsync/comm/sync.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libsync/comm') 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 Packet { // 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 Packet { // 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 Packet { 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 Buffer { 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()) } } } -- cgit 1.4.1-3-g733a5