diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-06-05 13:43:16 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-06-05 13:43:16 -0400 |
commit | 8799211cf9e7547416618725a86463444ed9e342 (patch) | |
tree | dfb3b73905a48f341051585845214589b07d21b2 /src/unix.rs | |
parent | 724ec36a7ab0dadb0229b9a16eb6179b032be39d (diff) |
replace unnecessary path copying with references instead
Diffstat (limited to 'src/unix.rs')
-rw-r--r-- | src/unix.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/unix.rs b/src/unix.rs index 70e234b..e8f52aa 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -67,7 +67,7 @@ pub fn set_mode(path: &Path, mode: u32) { } } -pub fn open_with_entry(paths: &[PathBuf], entry: &mimetype::JoshutoMimetypeEntry) { +pub fn open_with_entry(paths: &[&PathBuf], entry: &mimetype::JoshutoMimetypeEntry) { let program = entry.program.clone(); let mut command = process::Command::new(program); @@ -94,7 +94,7 @@ pub fn open_with_entry(paths: &[PathBuf], entry: &mimetype::JoshutoMimetypeEntry }; } -pub fn open_with_args(paths: &[PathBuf], args: &[String]) { +pub fn open_with_args(paths: &[&PathBuf], args: &[String]) { let program = args[0].clone(); let mut command = process::Command::new(program); |