diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-03-20 08:18:23 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-03-20 08:18:23 +0100 |
| commit | 1898a8e604ccfec4cb30c48dcfb75654898210d3 (patch) | |
| tree | a9d9c138bb56eedb51d946b3b6e7ea69c8a1c02e /talpid_ipc/src | |
| parent | c319871bd879b622ab479d02dcbe644fdc4a5a5b (diff) | |
| parent | 1ca4c2c4f6a7f1364eb0e5229ee17bb84ed05899 (diff) | |
| download | mullvadvpn-1898a8e604ccfec4cb30c48dcfb75654898210d3.tar.xz mullvadvpn-1898a8e604ccfec4cb30c48dcfb75654898210d3.zip | |
Merge branch 'clippy-cleanup'
Diffstat (limited to 'talpid_ipc/src')
| -rw-r--r-- | talpid_ipc/src/nop_ipc.rs | 4 | ||||
| -rw-r--r-- | talpid_ipc/src/zmq_ipc.rs | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/talpid_ipc/src/nop_ipc.rs b/talpid_ipc/src/nop_ipc.rs index 9a767f229d..50d4fae791 100644 --- a/talpid_ipc/src/nop_ipc.rs +++ b/talpid_ipc/src/nop_ipc.rs @@ -12,7 +12,7 @@ pub fn start_new_server<T, F>(_on_message: F) -> Result<IpcServerId> where T: serde::Deserialize + 'static, F: FnMut(Result<T>) + Send + 'static { - Err(ErrorKind::CouldNotStartServer.into()) + bail!(ErrorKind::CouldNotStartServer); } pub struct IpcClient<T> @@ -29,6 +29,6 @@ impl<T> IpcClient<T> } pub fn send(&mut self, _message: &T) -> Result<()> { - Err(ErrorKind::SendError.into()) + bail!(ErrorKind::SendError); } } diff --git a/talpid_ipc/src/zmq_ipc.rs b/talpid_ipc/src/zmq_ipc.rs index aeecf2be41..24d8e2f5d1 100644 --- a/talpid_ipc/src/zmq_ipc.rs +++ b/talpid_ipc/src/zmq_ipc.rs @@ -27,8 +27,7 @@ pub fn start_new_server<T, F>(on_message: F) -> Result<IpcServerId> return Ok(connection_string); } } - - return Err(ErrorKind::CouldNotStartServer.into()); + bail!(ErrorKind::CouldNotStartServer); } fn start_zmq_server(connection_string: &str) -> zmq::Result<zmq::Socket> { |
