From 199563550dd41c3dfb703bd3747604a8a03cdbc5 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 11 Jun 2026 14:20:49 +0200 Subject: chore: Remove all `pub`s They will not be marked by rustc/cargo as unused, and as atuin doesn't expose an API all of them _should_ be `pub(crate)` --- crates/turtle/src/atuin_daemon/components/search.rs | 12 ++++++------ 1 file changed, 6 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 85191cff..17decdad 100644 --- a/crates/turtle/src/atuin_daemon/components/search.rs +++ b/crates/turtle/src/atuin_daemon/components/search.rs @@ -34,7 +34,7 @@ const FRECENCY_REFRESH_INTERVAL_SECS: u64 = 60; /// - Loads history from the database on startup /// - Updates the index when history events occur /// - Provides the Search gRPC service -pub struct SearchComponent { +pub(crate) struct SearchComponent { index: Arc>, handle: tokio::sync::RwLock>, loader_handle: Option>, @@ -43,7 +43,7 @@ pub struct SearchComponent { impl SearchComponent { /// Create a new search component. - pub fn new() -> Self { + pub(crate) fn new() -> Self { Self { index: Arc::new(RwLock::new(SearchIndex::new())), handle: tokio::sync::RwLock::new(None), @@ -53,7 +53,7 @@ impl SearchComponent { } /// Get the gRPC service for this component. - pub fn grpc_service(&self) -> SearchServer { + pub(crate) fn grpc_service(&self) -> SearchServer { SearchServer::new(SearchGrpcService { index: self.index.clone(), }) @@ -273,7 +273,7 @@ impl Component for SearchComponent { } /// The gRPC service implementation. -pub struct SearchGrpcService { +pub(crate) struct SearchGrpcService { index: Arc>, } @@ -395,7 +395,7 @@ fn convert_filter_mode( } #[cfg(windows)] -pub fn with_trailing_slash(s: &str) -> String { +pub(crate) fn with_trailing_slash(s: &str) -> String { if s.ends_with('\\') { s.to_string() } else { @@ -404,7 +404,7 @@ pub fn with_trailing_slash(s: &str) -> String { } #[cfg(not(windows))] -pub fn with_trailing_slash(s: &str) -> String { +pub(crate) fn with_trailing_slash(s: &str) -> String { if s.ends_with('/') { s.to_string() } else { -- cgit v1.3.1