Skip to content

Commit

Permalink
Fix clippy lints (#861)
Browse files Browse the repository at this point in the history
* Remove dead docstring

The respective function has been removed a while ago.

* Elide unused named lifetimes
  • Loading branch information
sholderbach authored Dec 19, 2024
1 parent 9eb3c2d commit 86e3059
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/completion/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<Suggestion> {
match search_unique(self, line) {
Err(_) => vec![],
Expand Down
2 changes: 0 additions & 2 deletions src/history/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ pub trait History: Send {
/// load a history item by its id
fn load(&self, id: HistoryItemId) -> Result<HistoryItem>;

/// retrieves the next unused session id
/// count the results of a query
fn count(&self, query: SearchQuery) -> Result<i64>;
/// return the total number of history items
Expand Down

0 comments on commit 86e3059

Please sign in to comment.