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 /src | |
| parent | c319871bd879b622ab479d02dcbe644fdc4a5a5b (diff) | |
| parent | 1ca4c2c4f6a7f1364eb0e5229ee17bb84ed05899 (diff) | |
| download | mullvadvpn-1898a8e604ccfec4cb30c48dcfb75654898210d3.tar.xz mullvadvpn-1898a8e604ccfec4cb30c48dcfb75654898210d3.zip | |
Merge branch 'clippy-cleanup'
Diffstat (limited to 'src')
| -rw-r--r-- | src/net.rs | 2 | ||||
| -rw-r--r-- | src/process/monitor.rs | 4 | ||||
| -rw-r--r-- | src/process/openvpn.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/net.rs b/src/net.rs index fb119ea8af..3701ae641e 100644 --- a/src/net.rs +++ b/src/net.rs @@ -61,7 +61,7 @@ impl RemoteAddr { })?; if address.is_empty() || address.contains(':') { let msg = format!("Invalid IP or domain: \"{}\"", address); - return Err(ErrorKind::AddrParse(msg).into()); + bail!(ErrorKind::AddrParse(msg)); } Ok(RemoteAddr::Domain(address.to_owned(), port)) } diff --git a/src/process/monitor.rs b/src/process/monitor.rs index 070cbdf196..3a6f9fb65f 100644 --- a/src/process/monitor.rs +++ b/src/process/monitor.rs @@ -91,7 +91,7 @@ impl<S: ChildSpawner> ChildMonitor<S> { }); Ok(io) } else { - Err(ErrorKind::InvalidState.into()) + bail!(ErrorKind::InvalidState); } } @@ -116,7 +116,7 @@ impl<S: ChildSpawner> ChildMonitor<S> { running_state.child.kill().chain_err(|| ErrorKind::Kill)?; Ok(()) } else { - Err(ErrorKind::InvalidState.into()) + bail!(ErrorKind::InvalidState); } } } 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 } |
