Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy lints #861

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading