From bbdf38018b47328b5faa2cef635c37095045be72 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 12 Jun 2026 01:54:21 +0200 Subject: feat(server): Really make users stateless (with tests) This commit also remove another load of unneeded features. --- crates/turtle/src/atuin_client/history/store.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'crates/turtle/src/atuin_client/history') diff --git a/crates/turtle/src/atuin_client/history/store.rs b/crates/turtle/src/atuin_client/history/store.rs index b2265698..a8162e21 100644 --- a/crates/turtle/src/atuin_client/history/store.rs +++ b/crates/turtle/src/atuin_client/history/store.rs @@ -6,7 +6,7 @@ use rmp::decode::Bytes; use tracing::debug; use crate::atuin_client::{ - database::{Database, current_context}, + database::{ClientSqlite, current_context}, record::{encryption::PASETO_V4, sqlite_store::SqliteStore, store::Store}, }; use crate::atuin_common::record::{DecryptedData, Host, HostId, Record, RecordId, RecordIdx}; @@ -226,7 +226,7 @@ impl HistoryStore { Ok(ret) } - pub(crate) async fn build(&self, database: &dyn Database) -> Result<()> { + pub(crate) async fn build(&self, database: &ClientSqlite) -> Result<()> { // I'd like to change how we rebuild and not couple this with the database, but need to // consider the structure more deeply. This will be easy to change. @@ -258,7 +258,11 @@ impl HistoryStore { Ok(()) } - pub(crate) async fn incremental_build(&self, database: &dyn Database, ids: &[RecordId]) -> Result<()> { + pub(crate) async fn incremental_build( + &self, + database: &ClientSqlite, + ids: &[RecordId], + ) -> Result<()> { for id in ids { let record = self.store.get(*id).await; @@ -310,7 +314,7 @@ impl HistoryStore { Ok(ret) } - pub(crate) async fn init_store(&self, db: &impl Database) -> Result<()> { + pub(crate) async fn init_store(&self, db: &ClientSqlite) -> Result<()> { let pb = ProgressBar::new_spinner(); pb.set_style( ProgressStyle::with_template("{spinner:.blue} {msg}") -- cgit v1.3.1