summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2017-06-19 19:37:28 +0200
committerLinus Färnstrand <linus@mullvad.net>2017-06-19 19:37:28 +0200
commit6a30a8fb16e37e7f699af36a228cb079fe01a224 (patch)
tree8fca5d8939419d0f01a890d0fbf51a4d292bcf3a
parent98140cfbdcf62177d8c86c4cb01c15db5c7eb6ae (diff)
downloadmullvadvpn-6a30a8fb16e37e7f699af36a228cb079fe01a224.tar.xz
mullvadvpn-6a30a8fb16e37e7f699af36a228cb079fe01a224.zip
Change to simpler creation of PathBuf
-rw-r--r--talpid_core/src/tunnel/mod.rs5
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);