diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-06-19 19:37:28 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-06-19 19:37:28 +0200 |
| commit | 6a30a8fb16e37e7f699af36a228cb079fe01a224 (patch) | |
| tree | 8fca5d8939419d0f01a890d0fbf51a4d292bcf3a | |
| parent | 98140cfbdcf62177d8c86c4cb01c15db5c7eb6ae (diff) | |
| download | mullvadvpn-6a30a8fb16e37e7f699af36a228cb079fe01a224.tar.xz mullvadvpn-6a30a8fb16e37e7f699af36a228cb079fe01a224.zip | |
Change to simpler creation of PathBuf
| -rw-r--r-- | talpid_core/src/tunnel/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/talpid_core/src/tunnel/mod.rs b/talpid_core/src/tunnel/mod.rs index ce4d361814..6060e13208 100644 --- a/talpid_core/src/tunnel/mod.rs +++ b/talpid_core/src/tunnel/mod.rs @@ -2,7 +2,7 @@ use net; use openvpn_ffi::OpenVpnPluginEvent; use process::openvpn::OpenVpnCommand; use std::io; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; /// A module for all OpenVPN related tunnel management. pub mod openvpn; @@ -115,8 +115,7 @@ fn get_plugin_path() -> Result<PathBuf> { }; for dir in dirs { - let mut path = PathBuf::from(dir); - path.push(filename); + let path = Path::new(dir).join(filename); if path.exists() { debug!("Using OpenVPN plugin at {}", path.to_string_lossy()); return Ok(path); |
