diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-12-06 21:56:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 21:56:40 +0100 |
commit | 07f78912d629eb788cd9feca344e6b4720a3bef3 (patch) | |
tree | a734a53ca4151b02bd654d115a8eb947f79249aa /cli/tools/repl/editor.rs | |
parent | 9bdc9e4ecb7227c80384206f6d7f869f183e4525 (diff) |
chore: update rustyline to 13.0.0 (#21481)
Prerequisite for https://github.com/denoland/deno/pull/18453.
This update also makes it possible to address
https://github.com/denoland/deno/issues/8049 by
using
https://docs.rs/rustyline/latest/rustyline/struct.Editor.html#method.create_external_printer
Diffstat (limited to 'cli/tools/repl/editor.rs')
-rw-r--r-- | cli/tools/repl/editor.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |