aboutsummaryrefslogtreecommitdiffstats
path: root/crates/turtle/src/atuin_daemon/client.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-13 00:50:54 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-13 00:50:54 +0200
commit6723829a3398b3c9dd6dc6ae79124f46000606ee (patch)
treea1ec535eddd711a4557e4bcc5b94382c3623504c /crates/turtle/src/atuin_daemon/client.rs
parentchore(treewide): Cleanup themes (diff)
downloadatuin-6723829a3398b3c9dd6dc6ae79124f46000606ee.zip
chore(treewide): Remove `cargo` warnings to 0
There are still the `clippy` warnings, but they are for a future date.
Diffstat (limited to 'crates/turtle/src/atuin_daemon/client.rs')
-rw-r--r--crates/turtle/src/atuin_daemon/client.rs57
1 files changed, 32 insertions, 25 deletions
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 {}),