diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-12-02 15:46:44 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-12-03 12:30:33 +0000 |
| commit | 5f3e7e8903ea40cc0d9cb7e07683d9cd04d6e0c2 (patch) | |
| tree | c3bb60193900bd685d6644f07e627a4450b21557 /talpid-core/src | |
| parent | 9005d7018ba3d4bc855ec49d7e3b449c37f245a8 (diff) | |
| download | mullvadvpn-5f3e7e8903ea40cc0d9cb7e07683d9cd04d6e0c2.tar.xz mullvadvpn-5f3e7e8903ea40cc0d9cb7e07683d9cd04d6e0c2.zip | |
Use `PlatformTunProvider` directly
Diffstat (limited to 'talpid-core/src')
| -rw-r--r-- | talpid-core/src/tunnel_state_machine/blocked_state.rs | 2 | ||||
| -rw-r--r-- | talpid-core/src/tunnel_state_machine/disconnected_state.rs | 2 | ||||
| -rw-r--r-- | talpid-core/src/tunnel_state_machine/mod.rs | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/talpid-core/src/tunnel_state_machine/blocked_state.rs b/talpid-core/src/tunnel_state_machine/blocked_state.rs index bdf054ab2c..6e4fd5caab 100644 --- a/talpid-core/src/tunnel_state_machine/blocked_state.rs +++ b/talpid-core/src/tunnel_state_machine/blocked_state.rs @@ -2,7 +2,7 @@ use super::{ ConnectingState, DisconnectedState, EventConsequence, SharedTunnelStateValues, TunnelCommand, TunnelState, TunnelStateTransition, TunnelStateWrapper, }; -use crate::firewall::FirewallPolicy; +use crate::{firewall::FirewallPolicy, tunnel::tun_provider::TunProvider}; use futures::{sync::mpsc, Stream}; use talpid_types::{tunnel::BlockReason, ErrorExt}; diff --git a/talpid-core/src/tunnel_state_machine/disconnected_state.rs b/talpid-core/src/tunnel_state_machine/disconnected_state.rs index 6b95548ddd..20a93f3947 100644 --- a/talpid-core/src/tunnel_state_machine/disconnected_state.rs +++ b/talpid-core/src/tunnel_state_machine/disconnected_state.rs @@ -2,7 +2,7 @@ use super::{ BlockedState, ConnectingState, EventConsequence, SharedTunnelStateValues, TunnelCommand, TunnelState, TunnelStateTransition, TunnelStateWrapper, }; -use crate::firewall::FirewallPolicy; +use crate::{firewall::FirewallPolicy, tunnel::tun_provider::TunProvider}; use futures::{sync::mpsc, Stream}; use talpid_types::ErrorExt; diff --git a/talpid-core/src/tunnel_state_machine/mod.rs b/talpid-core/src/tunnel_state_machine/mod.rs index 1854ea07c7..482e50a952 100644 --- a/talpid-core/src/tunnel_state_machine/mod.rs +++ b/talpid-core/src/tunnel_state_machine/mod.rs @@ -19,7 +19,7 @@ use crate::{ firewall::{Firewall, FirewallArguments}, mpsc::IntoSender, offline, - tunnel::tun_provider::{PlatformTunProvider, TunProvider}, + tunnel::tun_provider::PlatformTunProvider, }; use futures::{sync::mpsc, Async, Future, Poll, Stream}; use std::{ @@ -133,7 +133,7 @@ fn create_event_loop<T>( block_when_disconnected: bool, is_offline: bool, tunnel_parameters_generator: impl TunnelParametersGenerator, - tun_provider: impl TunProvider, + tun_provider: PlatformTunProvider, log_dir: Option<PathBuf>, resource_dir: PathBuf, cache_dir: impl AsRef<Path>, @@ -199,7 +199,7 @@ impl TunnelStateMachine { block_when_disconnected: bool, is_offline: bool, tunnel_parameters_generator: impl TunnelParametersGenerator, - tun_provider: impl TunProvider, + tun_provider: PlatformTunProvider, log_dir: Option<PathBuf>, resource_dir: PathBuf, cache_dir: impl AsRef<Path>, @@ -225,7 +225,7 @@ impl TunnelStateMachine { block_when_disconnected, is_offline, tunnel_parameters_generator: Box::new(tunnel_parameters_generator), - tun_provider: Box::new(tun_provider), + tun_provider, log_dir, resource_dir, }; @@ -313,7 +313,7 @@ struct SharedTunnelStateValues { /// The generator of new `TunnelParameter`s tunnel_parameters_generator: Box<dyn TunnelParametersGenerator>, /// The provider of tunnel devices. - tun_provider: Box<dyn TunProvider>, + tun_provider: PlatformTunProvider, /// Directory to store tunnel log file. log_dir: Option<PathBuf>, /// Resource directory path. |
