From aa101f4d697dfebc886cd233e6a92d8957c27ca1 Mon Sep 17 00:00:00 2001 From: WindSoilder Date: Thu, 4 Jan 2024 21:44:18 +0800 Subject: [PATCH] fix clippy, add typo dict (#698) --- .typos.toml | 2 ++ src/engine.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.typos.toml b/.typos.toml index 93327348..4035ad9d 100644 --- a/.typos.toml +++ b/.typos.toml @@ -6,3 +6,5 @@ extend-exclude = ["src/core_editor/line_buffer.rs"] iterm = "iterm" # For testing completion of the word build bui = "bui" +# for sqlite backed history +wheres = "wheres" diff --git a/src/engine.rs b/src/engine.rs index 43555eec..30bb43bc 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -1538,7 +1538,7 @@ impl Reedline { self.get_history_session_id(), ))) .unwrap_or_else(|_| Vec::new()) - .get(0) + .first() .and_then(|history| history.command_line.split_whitespace().next_back()) .map(|token| (parsed.remainder.len(), indicator.len(), token.to_string())), });