diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2019-04-05 20:32:55 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2019-04-05 20:32:55 +0200 |
| commit | e56799a487983124ce3cfcd87a275a67c91c942b (patch) | |
| tree | 18cca9b3b5ebb07d8b638387740eeae1c091ab9e /talpid-core/src | |
| parent | 4d04e91cefd5b6b423cf54f1a8d205d2094931a0 (diff) | |
| download | mullvadvpn-e56799a487983124ce3cfcd87a275a67c91c942b.tar.xz mullvadvpn-e56799a487983124ce3cfcd87a275a67c91c942b.zip | |
Fix feedback
Diffstat (limited to 'talpid-core/src')
| -rw-r--r-- | talpid-core/src/tunnel/mod.rs | 3 | ||||
| -rw-r--r-- | talpid-core/src/tunnel_state_machine/connecting_state.rs | 14 |
2 files changed, 6 insertions, 11 deletions
diff --git a/talpid-core/src/tunnel/mod.rs b/talpid-core/src/tunnel/mod.rs index 7217d6b330..987f80c872 100644 --- a/talpid-core/src/tunnel/mod.rs +++ b/talpid-core/src/tunnel/mod.rs @@ -38,6 +38,7 @@ pub enum Error { RotateLogError(#[error(cause)] crate::logging::RotateLogError), /// Failure to build Wireguard configuration. + #[cfg(any(target_os = "linux", target_os = "macos"))] #[error(display = "Failed to configure Wireguard with the given parameters")] WireguardConfigError(#[error(cause)] self::wireguard::config::Error), @@ -46,7 +47,7 @@ pub enum Error { OpenVpnTunnelMonitoringError(#[error(cause)] openvpn::Error), /// There was an error listening for events from the Wireguard tunnel - #[cfg(unix)] + #[cfg(any(target_os = "linux", target_os = "macos"))] #[error(display = "Failed while listening for events from the Wireguard tunnel")] WirguardTunnelMonitoringError(#[error(cause)] wireguard::Error), } diff --git a/talpid-core/src/tunnel_state_machine/connecting_state.rs b/talpid-core/src/tunnel_state_machine/connecting_state.rs index 57f4dd8a34..f044c61df1 100644 --- a/talpid-core/src/tunnel_state_machine/connecting_state.rs +++ b/talpid-core/src/tunnel_state_machine/connecting_state.rs @@ -126,17 +126,11 @@ impl ConnectingState { } Err(error) => match error { #[cfg(windows)] - error @ tunnel::Error( - tunnel::ErrorKind::OpenVpnTunnelMonitoringError( - tunnel::openvpn::ErrorKind::DisabledTapAdapter, - ), - _, + error @ tunnel::Error::OpenVpnTunnelMonitoringError( + tunnel::openvpn::Error::DisabledTapAdapter, ) - | error @ tunnel::Error( - tunnel::ErrorKind::OpenVpnTunnelMonitoringError( - tunnel::openvpn::ErrorKind::MissingTapAdapter, - ), - _, + | error @ tunnel::Error::OpenVpnTunnelMonitoringError( + tunnel::openvpn::Error::MissingTapAdapter, ) => { warn!( "{}", |
