summaryrefslogtreecommitdiffstats
path: root/src/shell/history/mod.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-02-28 23:02:46 -0500
committerJesse Luehrs <doy@tozt.net>2022-02-28 23:02:46 -0500
commitb792d9a83d0ed5e71ba4c0ae62730db8fee00216 (patch)
tree45fe04a1e536e5b7df6e9a67bd86efa420667b01 /src/shell/history/mod.rs
parentb9d919152cfa12bf74d4ffc5d0b1528e3b64857a (diff)
downloadnbsh-b792d9a83d0ed5e71ba4c0ae62730db8fee00216.tar.gz
nbsh-b792d9a83d0ed5e71ba4c0ae62730db8fee00216.zip
push some copies up the stack
Diffstat (limited to 'src/shell/history/mod.rs')
-rw-r--r--src/shell/history/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shell/history/mod.rs b/src/shell/history/mod.rs
index 5bcc820..8b67ed2 100644
--- a/src/shell/history/mod.rs
+++ b/src/shell/history/mod.rs
@@ -90,24 +90,24 @@ impl History {
pub fn run(
&mut self,
- cmdline: &str,
- env: &Env,
+ cmdline: String,
+ env: Env,
event_w: crate::shell::event::Writer,
) -> usize {
let (input_w, input_r) = tokio::sync::mpsc::unbounded_channel();
let (resize_w, resize_r) = tokio::sync::mpsc::unbounded_channel();
let entry = std::sync::Arc::new(std::sync::Mutex::new(Entry::new(
- cmdline.to_string(),
+ cmdline.clone(),
env.clone(),
self.size,
input_w,
resize_w,
)));
run_commands(
- cmdline.to_string(),
+ cmdline,
std::sync::Arc::clone(&entry),
- env.clone(),
+ env,
input_r,
resize_r,
event_w,