diff options
| author | Ellie Huxtable <e@elm.sh> | 2021-04-20 17:07:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-20 16:07:11 +0000 |
| commit | 34888827f8a06de835cbe5833a06914f28cce514 (patch) | |
| tree | 8b56f20e50065cd2c222d5e8e067ec55cf1947a1 /src/command/mod.rs | |
| parent | Optimise docker (#34) (diff) | |
| download | atuin-34888827f8a06de835cbe5833a06914f28cce514.zip | |
Switch to Warp + SQLx, use async, switch to Rust stable (#36)
* Switch to warp + sql, use async and stable rust
* Update CI to use stable
Diffstat (limited to '')
| -rw-r--r-- | src/command/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command/mod.rs b/src/command/mod.rs index eeb11a87..cd857e9f 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -63,16 +63,16 @@ pub fn uuid_v4() -> String { } impl AtuinCmd { - pub fn run(self, db: &mut impl Database, settings: &Settings) -> Result<()> { + pub async fn run<T: Database + Send>(self, db: &mut T, settings: &Settings) -> Result<()> { match self { - Self::History(history) => history.run(settings, db), + Self::History(history) => history.run(settings, db).await, Self::Import(import) => import.run(db), - Self::Server(server) => server.run(settings), + Self::Server(server) => server.run(settings).await, Self::Stats(stats) => stats.run(db, settings), Self::Init => init::init(), Self::Search { query } => search::run(&query, db), - Self::Sync { force } => sync::run(settings, force, db), + Self::Sync { force } => sync::run(settings, force, db).await, Self::Login(l) => l.run(settings), Self::Register(r) => register::run( settings, |
