From e4ababed6a6b4f4f358c9e2d293e9b10a0954d52 Mon Sep 17 00:00:00 2001 From: Ray Kohler Date: Mon, 11 Aug 2025 18:14:21 -0400 Subject: fix: clippy warnings I don't have on my version of clippy --- crates/atuin-client/src/api_client.rs | 2 +- crates/atuin-client/src/database.rs | 2 +- crates/atuin-client/src/record/sqlite_store.rs | 2 +- crates/atuin-client/src/sync.rs | 4 ++-- crates/atuin-client/src/theme.rs | 9 ++------- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/crates/atuin-client/src/api_client.rs b/crates/atuin-client/src/api_client.rs index 2ab595d4..41f824a9 100644 --- a/crates/atuin-client/src/api_client.rs +++ b/crates/atuin-client/src/api_client.rs @@ -379,7 +379,7 @@ impl<'a> Client<'a> { let index = resp.json().await?; - debug!("got remote index {:?}", index); + debug!("got remote index {index:?}"); Ok(index) } diff --git a/crates/atuin-client/src/database.rs b/crates/atuin-client/src/database.rs index 472038f2..fac0eb89 100644 --- a/crates/atuin-client/src/database.rs +++ b/crates/atuin-client/src/database.rs @@ -133,7 +133,7 @@ pub struct Sqlite { impl Sqlite { pub async fn new(path: impl AsRef, timeout: f64) -> Result { let path = path.as_ref(); - debug!("opening sqlite database at {:?}", path); + debug!("opening sqlite database at {path:?}"); if utils::broken_symlink(path) { eprintln!( diff --git a/crates/atuin-client/src/record/sqlite_store.rs b/crates/atuin-client/src/record/sqlite_store.rs index e5f5f4e6..ed51f3fd 100644 --- a/crates/atuin-client/src/record/sqlite_store.rs +++ b/crates/atuin-client/src/record/sqlite_store.rs @@ -32,7 +32,7 @@ impl SqliteStore { pub async fn new(path: impl AsRef, timeout: f64) -> Result { let path = path.as_ref(); - debug!("opening sqlite database at {:?}", path); + debug!("opening sqlite database at {path:?}"); if utils::broken_symlink(path) { eprintln!( diff --git a/crates/atuin-client/src/sync.rs b/crates/atuin-client/src/sync.rs index ac63c2c0..57ac18e4 100644 --- a/crates/atuin-client/src/sync.rs +++ b/crates/atuin-client/src/sync.rs @@ -142,7 +142,7 @@ async fn sync_upload( let local_count = db.history_count(true).await?; - debug!("remote has {}, we have {}", remote_count, local_count); + debug!("remote has {remote_count}, we have {local_count}"); // first just try the most recent set let mut cursor = OffsetDateTime::now_utc(); @@ -174,7 +174,7 @@ async fn sync_upload( cursor = buffer.last().unwrap().timestamp; remote_count = client.count().await?; - debug!("upload cursor: {:?}", cursor); + debug!("upload cursor: {cursor:?}"); } let deleted = db.deleted().await?; diff --git a/crates/atuin-client/src/theme.rs b/crates/atuin-client/src/theme.rs index 1d4202b5..fc15bfd8 100644 --- a/crates/atuin-client/src/theme.rs +++ b/crates/atuin-client/src/theme.rs @@ -133,12 +133,7 @@ impl Theme { *name, StyleFactory::from_fg_string(color).unwrap_or_else(|err| { if debug { - log::warn!( - "Tried to load string as a color unsuccessfully: ({}={}) {}", - name, - color, - err - ); + log::warn!("Tried to load string as a color unsuccessfully: ({name}={color}) {err}"); } ContentStyle::default() }), @@ -465,7 +460,7 @@ impl ThemeManager { None => match self.load_theme_from_file(name, max_depth.unwrap_or(DEFAULT_MAX_DEPTH)) { Ok(theme) => theme, Err(err) => { - log::warn!("Could not load theme {}: {}", name, err); + log::warn!("Could not load theme {name}: {err}"); built_ins.get("default").unwrap() } }, -- cgit v1.3.1