diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 9149b17..256de97 100644 --- a/src/main.rs +++ b/src/main.rs @@ -388,7 +388,7 @@ fn repl(opt: &Opt) -> Result<()> { loop { let line = rl.readline("Query> ")?; rl.add_history_entry(&line); - maybe_save_history(&rl, history_path.as_ref().map(|r| r as &Path)); + maybe_save_history(&mut rl, history_path.as_ref().map(|r| r as &Path)); let parsed = build_filter(&line); INTERRUPTED.store(false, Ordering::Relaxed); @@ -408,8 +408,8 @@ fn maybe_load_history(rl: &mut Editor<()>, path: Option<&Path>) { } } -fn maybe_save_history(rl: &Editor<()>, path: Option<&Path>) { - let run = |path: &Path| -> Result<()> { +fn maybe_save_history(rl: &mut Editor<()>, path: Option<&Path>) { + let mut run = |path: &Path| -> Result<()> { debug!("Saving history to {:?}", path); let parent = path .parent() |