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/client.rs | 57 ++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 25 deletions(-) (limited to 'crates/turtle/src/atuin_daemon/client.rs') diff --git a/crates/turtle/src/atuin_daemon/client.rs b/crates/turtle/src/atuin_daemon/client.rs index 325b21b8..4ec1a60b 100644 --- a/crates/turtle/src/atuin_daemon/client.rs +++ b/crates/turtle/src/atuin_daemon/client.rs @@ -1,5 +1,3 @@ -use crate::atuin_client::database::Context; -use crate::atuin_client::settings::{FilterMode, Settings}; use eyre::{Context as EyreContext, Result}; use tonic::Code; use tonic::transport::{Channel, Endpoint, Uri}; @@ -9,27 +7,38 @@ use hyper_util::rt::TokioIo; #[cfg(unix)] use tokio::net::UnixStream; - -use crate::atuin_client::history::History; use tracing::{Level, instrument, span}; -use crate::atuin_daemon::control::HistoryRebuiltEvent; -use crate::atuin_daemon::control::{ - ForceSyncEvent, HistoryDeletedEvent, HistoryPrunedEvent, SendEventRequest, - SettingsReloadedEvent, ShutdownEvent, control_client::ControlClient as ControlServiceClient, -}; -use crate::atuin_daemon::events::DaemonEvent; -use crate::atuin_daemon::history::{ - EndHistoryReply, EndHistoryRequest, ShutdownRequest, StartHistoryReply, StartHistoryRequest, - StatusReply, StatusRequest, TailHistoryReply, TailHistoryRequest, - history_client::HistoryClient as HistoryServiceClient, -}; -use crate::atuin_daemon::search::{ - FilterMode as RpcFilterMode, SearchContext as RpcSearchContext, SearchRequest, SearchResponse, - search_client::SearchClient as SearchServiceClient, -}; -use crate::atuin_daemon::semantic::{ - CommandCapture, RecordCommandsReply, semantic_client::SemanticClient as SemanticServiceClient, +use crate::atuin_daemon::generated; +use crate::{ + atuin_client::{ + database::Context, + history::History, + settings::{FilterMode, Settings}, + }, + atuin_daemon::{ + events::DaemonEvent, + generated::{ + control::{ + ForceSyncEvent, HistoryDeletedEvent, HistoryPrunedEvent, HistoryRebuiltEvent, + SendEventRequest, SettingsReloadedEvent, ShutdownEvent, + control_client::ControlClient as ControlServiceClient, + }, + history::{ + EndHistoryReply, EndHistoryRequest, ShutdownRequest, StartHistoryReply, + StartHistoryRequest, StatusReply, StatusRequest, TailHistoryReply, + TailHistoryRequest, history_client::HistoryClient as HistoryServiceClient, + }, + search::{ + FilterMode as RpcFilterMode, SearchContext as RpcSearchContext, SearchRequest, + SearchResponse, search_client::SearchClient as SearchServiceClient, + }, + semantic::{ + CommandCapture, RecordCommandsReply, + semantic_client::SemanticClient as SemanticServiceClient, + }, + }, + }, }; pub(crate) struct HistoryClient { @@ -311,10 +320,8 @@ impl ControlClient { } /// Convert a daemon event to its proto representation. -fn daemon_event_to_proto( - event: DaemonEvent, -) -> crate::atuin_daemon::control::send_event_request::Event { - use crate::atuin_daemon::control::send_event_request::Event; +fn daemon_event_to_proto(event: DaemonEvent) -> generated::control::send_event_request::Event { + use generated::control::send_event_request::Event; match event { DaemonEvent::HistoryPruned => Event::HistoryPruned(HistoryPrunedEvent {}), -- cgit v1.3.1