summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2017-03-29 10:48:16 +0200
committerLinus Färnstrand <linus@mullvad.net>2017-03-29 10:48:16 +0200
commitb42bd2d2383806a147c4e6ec0362dd3823d33c96 (patch)
tree2666244c8011e846f80d8db24ac4cac76ea28726
parent075f980a12f3b7e81da93928d475278b67b0cc47 (diff)
downloadmullvadvpn-b42bd2d2383806a147c4e6ec0362dd3823d33c96.tar.xz
mullvadvpn-b42bd2d2383806a147c4e6ec0362dd3823d33c96.zip
One line should_stop
-rw-r--r--talpid_ipc/src/http_ipc.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/talpid_ipc/src/http_ipc.rs b/talpid_ipc/src/http_ipc.rs
index 15304e87fa..a650a6b21c 100644
--- a/talpid_ipc/src/http_ipc.rs
+++ b/talpid_ipc/src/http_ipc.rs
@@ -67,10 +67,7 @@ fn start_receive_loop<T, U, F>(mut on_message: F,
}
fn should_stop(stop_rx: &mpsc::Receiver<u8>) -> bool {
- match stop_rx.try_recv() {
- Err(mpsc::TryRecvError::Empty) => false,
- _ => true,
- }
+ stop_rx.try_recv() != Err(mpsc::TryRecvError::Empty)
}
fn receive<T, U, F>(on_message: &mut F, http_server: &tiny_http::Server)