summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2019-04-05 20:32:55 +0200
committerLinus Färnstrand <linus@mullvad.net>2019-04-05 20:32:55 +0200
commite56799a487983124ce3cfcd87a275a67c91c942b (patch)
tree18cca9b3b5ebb07d8b638387740eeae1c091ab9e
parent4d04e91cefd5b6b423cf54f1a8d205d2094931a0 (diff)
downloadmullvadvpn-e56799a487983124ce3cfcd87a275a67c91c942b.tar.xz
mullvadvpn-e56799a487983124ce3cfcd87a275a67c91c942b.zip
Fix feedback
-rw-r--r--talpid-core/src/tunnel/mod.rs3
-rw-r--r--talpid-core/src/tunnel_state_machine/connecting_state.rs14
-rw-r--r--talpid-openvpn-plugin/src/lib.rs2
3 files changed, 7 insertions, 12 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!(
"{}",
diff --git a/talpid-openvpn-plugin/src/lib.rs b/talpid-openvpn-plugin/src/lib.rs
index fab5ce4ba2..c2080e294a 100644
--- a/talpid-openvpn-plugin/src/lib.rs
+++ b/talpid-openvpn-plugin/src/lib.rs
@@ -21,7 +21,7 @@ pub enum Error {
#[error(display = "No core server id given as first argument")]
MissingCoreServerId,
- #[error(display = "Failed to sending an event to daemon over the IPC channel")]
+ #[error(display = "Failed to send an event to daemon over the IPC channel")]
SendEvent(#[error(cause)] jsonrpc_client_core::Error),
#[error(display = "Connection is shut down")]