From 6723829a3398b3c9dd6dc6ae79124f46000606ee Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 13 Jun 2026 00:50:54 +0200 Subject: chore(treewide): Remove `cargo` warnings to 0 There are still the `clippy` warnings, but they are for a future date. --- crates/turtle/src/atuin_daemon/components/search.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'crates/turtle/src/atuin_daemon/components/search.rs') diff --git a/crates/turtle/src/atuin_daemon/components/search.rs b/crates/turtle/src/atuin_daemon/components/search.rs index 832d05d8..39df758b 100644 --- a/crates/turtle/src/atuin_daemon/components/search.rs +++ b/crates/turtle/src/atuin_daemon/components/search.rs @@ -15,10 +15,11 @@ use uuid::Uuid; use crate::atuin_daemon::{ daemon::{Component, DaemonHandle}, events::DaemonEvent, - search::{ - FilterMode, IndexFilterMode, QueryContext, SearchIndex, SearchRequest, SearchResponse, + generated::search::{ + self, FilterMode, SearchRequest, SearchResponse, search_server::{Search as SearchSvc, SearchServer}, }, + search::{IndexFilterMode, QueryContext, SearchIndex}, }; const PAGE_SIZE: usize = 5000; @@ -35,7 +36,7 @@ const FRECENCY_REFRESH_INTERVAL_SECS: u64 = 60; /// - Provides the Search gRPC service pub(crate) struct SearchComponent { index: Arc>, - handle: tokio::sync::RwLock>, + handle: RwLock>, loader_handle: Option>, frecency_handle: Option>, } @@ -45,7 +46,7 @@ impl SearchComponent { pub(crate) fn new() -> Self { Self { index: Arc::new(RwLock::new(SearchIndex::new())), - handle: tokio::sync::RwLock::new(None), + handle: RwLock::new(None), loader_handle: None, frecency_handle: None, } @@ -351,7 +352,7 @@ impl SearchSvc for SearchGrpcService { } } Err(e) => { - let _ = tx.send(Err(e)).await; + drop(tx.send(Err(e)).await); break; } } @@ -367,7 +368,7 @@ impl SearchSvc for SearchGrpcService { /// Convert proto FilterMode and context to IndexFilterMode. fn convert_filter_mode( mode: FilterMode, - context: &Option, + context: &Option, ) -> IndexFilterMode { match (mode, context) { (FilterMode::Global, _) => IndexFilterMode::Global, -- cgit v1.3.1