From 86e3059334037671fd02e0983ff1963d3d66c6f8 Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Thu, 19 Dec 2024 22:10:47 +0100 Subject: [PATCH] Fix clippy lints (#861) * Remove dead docstring The respective function has been removed a while ago. * Elide unused named lifetimes --- src/completion/history.rs | 4 ++-- src/history/base.rs | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/completion/history.rs b/src/completion/history.rs index fda3384f..a29e2b04 100644 --- a/src/completion/history.rs +++ b/src/completion/history.rs @@ -13,7 +13,7 @@ pub(crate) struct HistoryCompleter<'menu>(&'menu dyn History); // Safe to implement Send since the HistoryCompleter should only be used when // updating the menu and that must happen in the same thread -unsafe impl<'menu> Send for HistoryCompleter<'menu> {} +unsafe impl Send for HistoryCompleter<'_> {} fn search_unique( completer: &HistoryCompleter, @@ -30,7 +30,7 @@ fn search_unique( .filter(move |value| seen_matching_command_lines.insert(value.command_line.clone()))) } -impl<'menu> Completer for HistoryCompleter<'menu> { +impl Completer for HistoryCompleter<'_> { fn complete(&mut self, line: &str, pos: usize) -> Vec { match search_unique(self, line) { Err(_) => vec![], diff --git a/src/history/base.rs b/src/history/base.rs index 93f7f456..6b76a241 100644 --- a/src/history/base.rs +++ b/src/history/base.rs @@ -183,8 +183,6 @@ pub trait History: Send { /// load a history item by its id fn load(&self, id: HistoryItemId) -> Result; - /// retrieves the next unused session id - /// count the results of a query fn count(&self, query: SearchQuery) -> Result; /// return the total number of history items