diff options
| author | Conrad Ludgate <conradludgate@gmail.com> | 2023-10-08 17:15:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-08 16:15:14 +0000 |
| commit | 38172f35016459b7765dfacdbe1f8225fca59e50 (patch) | |
| tree | 572ba5b5983ad672f23e1ccbf8ae59a7d7242bef /atuin-client/src/database.rs | |
| parent | fix(1220): Workspace Filtermode not handled in skim engine (#1273) (diff) | |
| download | atuin-38172f35016459b7765dfacdbe1f8225fca59e50.zip | |
clear history id (#1263)
* clear history id
* fix nu
Diffstat (limited to '')
| -rw-r--r-- | atuin-client/src/database.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/atuin-client/src/database.rs b/atuin-client/src/database.rs index c75a32ce..a7be9436 100644 --- a/atuin-client/src/database.rs +++ b/atuin-client/src/database.rs @@ -70,8 +70,8 @@ pub fn current_context() -> Context { #[async_trait] pub trait Database: Send + Sync + 'static { - async fn save(&mut self, h: &History) -> Result<()>; - async fn save_bulk(&mut self, h: &[History]) -> Result<()>; + async fn save(&self, h: &History) -> Result<()>; + async fn save_bulk(&self, h: &[History]) -> Result<()>; async fn load(&self, id: &str) -> Result<Option<History>>; async fn list( @@ -193,7 +193,7 @@ impl Sqlite { #[async_trait] impl Database for Sqlite { - async fn save(&mut self, h: &History) -> Result<()> { + async fn save(&self, h: &History) -> Result<()> { debug!("saving history to sqlite"); let mut tx = self.pool.begin().await?; Self::save_raw(&mut tx, h).await?; @@ -202,7 +202,7 @@ impl Database for Sqlite { Ok(()) } - async fn save_bulk(&mut self, h: &[History]) -> Result<()> { + async fn save_bulk(&self, h: &[History]) -> Result<()> { debug!("saving history to sqlite"); let mut tx = self.pool.begin().await?; |
