diff options
Diffstat (limited to 'src/runner/command.rs')
-rw-r--r-- | src/runner/command.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runner/command.rs b/src/runner/command.rs index 059b173..cbc8dee 100644 --- a/src/runner/command.rs +++ b/src/runner/command.rs @@ -15,7 +15,7 @@ impl Command { let redirects = exe.redirects().to_vec(); Self { inner: super::builtins::Command::new(exe, io).map_or_else( - |exe| Self::new_binary(exe).inner, + |exe| Self::new_binary(&exe).inner, Inner::Builtin, ), exe: exe_path, @@ -24,8 +24,7 @@ impl Command { } } - #[allow(clippy::needless_pass_by_value)] - pub fn new_binary(exe: crate::parse::Exe) -> Self { + pub fn new_binary(exe: &crate::parse::Exe) -> Self { let exe_path = exe.exe().to_path_buf(); let redirects = exe.redirects().to_vec(); let mut cmd = tokio::process::Command::new(exe.exe()); |