From 4930f050c56660c245e5976979babb66aea7bfd5 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 20 Jul 2026 23:44:15 +0200 Subject: chore: Last big refactoring --- crates/daemon/src/api/control.rs | 8 ++------ crates/daemon/src/api/history.rs | 5 +---- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'crates/daemon/src/api') diff --git a/crates/daemon/src/api/control.rs b/crates/daemon/src/api/control.rs index 94fb7ce9..ff19f593 100644 --- a/crates/daemon/src/api/control.rs +++ b/crates/daemon/src/api/control.rs @@ -37,18 +37,14 @@ enum SyncState { /// It's not a component - it's part of the daemon's core infrastructure. pub(crate) struct ControlService { handle: DaemonHandle, - task_handle: tokio::task::JoinHandle<()>, } impl ControlService { /// Create a new control service with the given daemon handle. pub(crate) fn new(handle: DaemonHandle) -> Self { - let task_handle = tokio::spawn(sync_loop(handle.clone())); + tokio::spawn(sync_loop(handle.clone())); - Self { - handle, - task_handle, - } + Self { handle } } /// Get a tonic server for this service. diff --git a/crates/daemon/src/api/history.rs b/crates/daemon/src/api/history.rs index d024ea92..6165464d 100644 --- a/crates/daemon/src/api/history.rs +++ b/crates/daemon/src/api/history.rs @@ -90,10 +90,7 @@ impl HistorySvc for HistoryService { self.handle.history_db().range(from, to).await } else { - self.handle - .history_db() - .list(None, None, false, false) - .await + self.handle.history_db().list(None, false, false).await } .map_err(|e| Status::internal(format!("failed to read db: {e:?}")))? .into_iter() -- cgit v1.3.1