diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-03-16 09:45:13 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-03-16 09:45:13 +0100 |
| commit | f34a0d45dadfc0a7432b8dc76aa0e8cc1e677c01 (patch) | |
| tree | 558e982b317c515ffbd7ab757c5074e06f8a85cb | |
| parent | c319871bd879b622ab479d02dcbe644fdc4a5a5b (diff) | |
| download | mullvadvpn-f34a0d45dadfc0a7432b8dc76aa0e8cc1e677c01.tar.xz mullvadvpn-f34a0d45dadfc0a7432b8dc76aa0e8cc1e677c01.zip | |
Clean up according to clippy lints
| -rw-r--r-- | src/process/openvpn.rs | 2 | ||||
| -rw-r--r-- | talpid_ipc/src/zmq_ipc.rs | 3 | ||||
| -rw-r--r-- | talpid_openvpn_plugin/src/lib.rs | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/process/openvpn.rs b/src/process/openvpn.rs index b6d82f02a9..e002d2b9c3 100644 --- a/src/process/openvpn.rs +++ b/src/process/openvpn.rs @@ -119,7 +119,7 @@ impl OpenVpnCommand { if let Some((ref path, ref plugin_args)) = self.plugin { args.push(OsString::from("--plugin")); args.push(OsString::from(path)); - args.extend(plugin_args.iter().map(|arg| OsString::from(arg))); + args.extend(plugin_args.iter().map(OsString::from)); } args } diff --git a/talpid_ipc/src/zmq_ipc.rs b/talpid_ipc/src/zmq_ipc.rs index aeecf2be41..7a9c6759b5 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()); + Err(ErrorKind::CouldNotStartServer.into()) } fn start_zmq_server(connection_string: &str) -> zmq::Result<zmq::Socket> { diff --git a/talpid_openvpn_plugin/src/lib.rs b/talpid_openvpn_plugin/src/lib.rs index 203b9502ee..14a6816894 100644 --- a/talpid_openvpn_plugin/src/lib.rs +++ b/talpid_openvpn_plugin/src/lib.rs @@ -87,7 +87,7 @@ fn parse_args(args: *const openvpn_plugin_args_open_in) -> Result<talpid_ipc::Ip .into_iter(); let _plugin_path = args_iter.next(); let core_server_id: String = args_iter.next() - .ok_or(ErrorKind::Msg("No core server id given as first argument".to_owned()))?; + .ok_or_else(|| ErrorKind::Msg("No core server id given as first argument".to_owned()))?; Ok(core_server_id) } |
