summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/Cargo.toml2
-rw-r--r--cli/tools/repl/editor.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 82aedcec0..95b221e14 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -121,7 +121,7 @@ quick-junit = "^0.3.5"
rand = { workspace = true, features = ["small_rng"] }
regex.workspace = true
ring.workspace = true
-rustyline = { version = "=10.0.0", default-features = false, features = ["custom-bindings"] }
+rustyline = { version = "=13.0.0", default-features = false, features = ["custom-bindings", "with-file-history"] }
rustyline-derive = "=0.7.0"
serde.workspace = true
serde_repr.workspace = true
diff --git a/cli/tools/repl/editor.rs b/cli/tools/repl/editor.rs
index 0bf2da7c8..267c5bd23 100644
--- a/cli/tools/repl/editor.rs
+++ b/cli/tools/repl/editor.rs
@@ -341,7 +341,7 @@ impl Highlighter for EditorHelper {
}
}
- fn highlight_char(&self, line: &str, _: usize) -> bool {
+ fn highlight_char(&self, line: &str, _: usize, _: bool) -> bool {
!line.is_empty()
}
@@ -422,7 +422,7 @@ impl Highlighter for EditorHelper {
#[derive(Clone)]
pub struct ReplEditor {
- inner: Arc<Mutex<Editor<EditorHelper>>>,
+ inner: Arc<Mutex<Editor<EditorHelper, rustyline::history::FileHistory>>>,
history_file_path: Option<PathBuf>,
errored_on_history_save: Arc<AtomicBool>,
should_exit_on_interrupt: Arc<AtomicBool>,
@@ -482,7 +482,7 @@ impl ReplEditor {
}
pub fn update_history(&self, entry: String) {
- self.inner.lock().add_history_entry(entry);
+ let _ = self.inner.lock().add_history_entry(entry);
if let Some(history_file_path) = &self.history_file_path {
if let Err(e) = self.inner.lock().append_history(history_file_path) {
if self.errored_on_history_save.load(Relaxed) {