summaryrefslogtreecommitdiffstats
path: root/tokio/src/park/thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/park/thread.rs')
-rw-r--r--tokio/src/park/thread.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tokio/src/park/thread.rs b/tokio/src/park/thread.rs
index 9ed41310..494c02b4 100644
--- a/tokio/src/park/thread.rs
+++ b/tokio/src/park/thread.rs
@@ -87,7 +87,7 @@ impl Inner {
}
// Otherwise we need to coordinate going to sleep
- let mut m = self.mutex.lock().unwrap();
+ let mut m = self.mutex.lock();
match self.state.compare_exchange(EMPTY, PARKED, SeqCst, SeqCst) {
Ok(_) => {}
@@ -137,7 +137,7 @@ impl Inner {
return;
}
- let m = self.mutex.lock().unwrap();
+ let m = self.mutex.lock();
match self.state.compare_exchange(EMPTY, PARKED, SeqCst, SeqCst) {
Ok(_) => {}
@@ -188,7 +188,7 @@ impl Inner {
// Releasing `lock` before the call to `notify_one` means that when the
// parked thread wakes it doesn't get woken only to have to wait for us
// to release `lock`.
- drop(self.mutex.lock().unwrap());
+ drop(self.mutex.lock());
self.condvar.notify_one()
}