diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-02-20 12:26:39 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-02-24 12:45:08 +0000 |
| commit | d28aecd598e951c6df16d364296a1326bfa0a90b (patch) | |
| tree | 84a8e0434911a46bfd0e1b64f2433f09aab49271 /talpid-core/src | |
| parent | 3fb7b0e0b5a8bd421b5b548f1912f1196d18998e (diff) | |
| download | mullvadvpn-d28aecd598e951c6df16d364296a1326bfa0a90b.tar.xz mullvadvpn-d28aecd598e951c6df16d364296a1326bfa0a90b.zip | |
Remove generic type parameter from `spawn` func.
Diffstat (limited to 'talpid-core/src')
| -rw-r--r-- | talpid-core/src/tunnel_state_machine/mod.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/talpid-core/src/tunnel_state_machine/mod.rs b/talpid-core/src/tunnel_state_machine/mod.rs index c4b46bccd6..773a14e8da 100644 --- a/talpid-core/src/tunnel_state_machine/mod.rs +++ b/talpid-core/src/tunnel_state_machine/mod.rs @@ -62,19 +62,16 @@ pub enum Error { } /// Spawn the tunnel state machine thread, returning a channel for sending tunnel commands. -pub fn spawn<P>( +pub fn spawn( allow_lan: bool, block_when_disconnected: bool, tunnel_parameters_generator: impl TunnelParametersGenerator, log_dir: Option<PathBuf>, resource_dir: PathBuf, - cache_dir: P, + cache_dir: impl AsRef<Path> + Send + 'static, state_change_listener: impl Sender<TunnelStateTransition> + Send + 'static, #[cfg(target_os = "android")] android_context: AndroidContext, -) -> Result<Arc<mpsc::UnboundedSender<TunnelCommand>>, Error> -where - P: AsRef<Path> + Send + 'static, -{ +) -> Result<Arc<mpsc::UnboundedSender<TunnelCommand>>, Error> { let (command_tx, command_rx) = mpsc::unbounded(); let command_tx = Arc::new(command_tx); let offline_monitor = offline::spawn_monitor( |
