diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-03-29 10:51:58 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-03-29 10:51:58 +0200 |
| commit | d9f6bd04dc79e47acbd4f9ceab03346ac81eaafb (patch) | |
| tree | 0b2858aae44675c4ae07b459615fac1e7861c0d1 | |
| parent | 9ef8eb65d1bf2e96c678514c1e7e59b57c8ca33d (diff) | |
| download | mullvadvpn-d9f6bd04dc79e47acbd4f9ceab03346ac81eaafb.tar.xz mullvadvpn-d9f6bd04dc79e47acbd4f9ceab03346ac81eaafb.zip | |
Empty type on channel with unused content
| -rw-r--r-- | talpid_ipc/src/http_ipc.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/talpid_ipc/src/http_ipc.rs b/talpid_ipc/src/http_ipc.rs index b9b8580616..7613f9fa82 100644 --- a/talpid_ipc/src/http_ipc.rs +++ b/talpid_ipc/src/http_ipc.rs @@ -9,11 +9,11 @@ use std::time::Duration; pub struct HttpServerHandle { pub address: IpcServerId, - stop_tx: mpsc::SyncSender<u8>, + stop_tx: mpsc::SyncSender<()>, } impl HttpServerHandle { pub fn stop(&self) { - let _ = self.stop_tx.send(0); + let _ = self.stop_tx.send(()); } } impl Drop for HttpServerHandle { @@ -51,7 +51,7 @@ fn start_http_server(addr: &str) -> Result<tiny_http::Server> { fn start_receive_loop<T, U, F>(mut on_message: F, http_server: tiny_http::Server, - stop_rx: mpsc::Receiver<u8>) + stop_rx: mpsc::Receiver<()>) where T: serde::Deserialize + 'static, U: serde::Serialize, F: FnMut(Result<T>) -> U + Send + 'static @@ -64,7 +64,7 @@ fn start_receive_loop<T, U, F>(mut on_message: F, }); } -fn should_stop(stop_rx: &mpsc::Receiver<u8>) -> bool { +fn should_stop(stop_rx: &mpsc::Receiver<()>) -> bool { stop_rx.try_recv() != Err(mpsc::TryRecvError::Empty) } |
