From 157dae10962d6d36ba15e645bb2b1ba961e75a6a Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Fri, 22 Apr 2022 12:39:51 +0100 Subject: [PATCH] fmt --- atuin-client/Cargo.toml | 9 ++++----- atuin-client/src/lib.rs | 4 ++-- src/command/client.rs | 1 - src/command/client/history.rs | 3 ++- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/atuin-client/Cargo.toml b/atuin-client/Cargo.toml index 89e34508846..1b3187b91a5 100644 --- a/atuin-client/Cargo.toml +++ b/atuin-client/Cargo.toml @@ -10,6 +10,10 @@ repository = "https://github.com/ellie/atuin" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +default = ["sync"] +sync = ["urlencoding", "sodiumoxide", "reqwest"] + [dependencies] atuin-common = { path = "../atuin-common", version = "0.8.1" } @@ -33,7 +37,6 @@ async-trait = "0.1.49" itertools = "0.10.3" shellexpand = "2" sqlx = { version = "0.5", features = [ - "runtime-tokio-rustls", "uuid", "chrono", "sqlite", @@ -48,7 +51,3 @@ reqwest = { version = "0.11", features = [ "json", "rustls-tls", ], default-features = false, optional = true } - -[features] -default = [] -sync = ["urlencoding", "sodiumoxide", "reqwest"] diff --git a/atuin-client/src/lib.rs b/atuin-client/src/lib.rs index 0788b97fd49..497c5e749a5 100644 --- a/atuin-client/src/lib.rs +++ b/atuin-client/src/lib.rs @@ -6,9 +6,9 @@ extern crate log; #[cfg(feature = "sync")] pub mod api_client; #[cfg(feature = "sync")] -pub mod sync; -#[cfg(feature = "sync")] pub mod encryption; +#[cfg(feature = "sync")] +pub mod sync; pub mod database; pub mod history; diff --git a/src/command/client.rs b/src/command/client.rs index 8b5495f9a1b..4858e2ba173 100644 --- a/src/command/client.rs +++ b/src/command/client.rs @@ -45,7 +45,6 @@ pub enum Cmd { /// Interactive history search Search(search::Cmd), - /// Generate shell completions GenCompletions { /// Set the shell for generating completions diff --git a/src/command/client/history.rs b/src/command/client/history.rs index 6ca67513d22..48975fb9443 100644 --- a/src/command/client/history.rs +++ b/src/command/client/history.rs @@ -143,7 +143,8 @@ impl Cmd { db.update(&h).await?; if settings.should_sync()? { - #[cfg(feature = "sync")] { + #[cfg(feature = "sync")] + { debug!("running periodic background sync"); sync::sync(settings, false, db).await?; }