aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client/src
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@atuin.sh>2025-07-22 16:03:20 +0200
committerGitHub <noreply@github.com>2025-07-22 16:03:20 +0200
commite7819d258a29eeec0e9255a961fee3b44735afab (patch)
treee76946f1906d29e999485f3b2bd424fc7375037f /crates/atuin-client/src
parentUpdate indicatif to 0.18.0 (#2833) (diff)
downloadatuin-e7819d258a29eeec0e9255a961fee3b44735afab.zip
chore: update to rust 1.88 (#2815)
* chore: update to rust 1.88 * clippy + fmt * update ci version * update flake
Diffstat (limited to 'crates/atuin-client/src')
-rw-r--r--crates/atuin-client/src/api_client.rs6
-rw-r--r--crates/atuin-client/src/encryption.rs2
-rw-r--r--crates/atuin-client/src/import/bash.rs6
-rw-r--r--crates/atuin-client/src/theme.rs7
4 files changed, 10 insertions, 11 deletions
diff --git a/crates/atuin-client/src/api_client.rs b/crates/atuin-client/src/api_client.rs
index c2bdfadc..78f374d6 100644
--- a/crates/atuin-client/src/api_client.rs
+++ b/crates/atuin-client/src/api_client.rs
@@ -41,7 +41,7 @@ fn make_url(address: &str, path: &str) -> Result<String> {
let address = if address.ends_with("/") {
address
} else {
- &format!("{}/", address)
+ &format!("{address}/")
};
// passing a path with a leading `/` will cause `join()` to replace the entire URL path
@@ -148,8 +148,8 @@ pub fn ensure_version(response: &Response) -> Result<bool> {
println!(
"Atuin version mismatch! In order to successfully sync, the server needs to run a newer version of Atuin"
);
- println!("Client: {}", ATUIN_CARGO_VERSION);
- println!("Server: {}", version);
+ println!("Client: {ATUIN_CARGO_VERSION}");
+ println!("Server: {version}");
return Ok(false);
}
diff --git a/crates/atuin-client/src/encryption.rs b/crates/atuin-client/src/encryption.rs
index a1e844e7..a56dbd09 100644
--- a/crates/atuin-client/src/encryption.rs
+++ b/crates/atuin-client/src/encryption.rs
@@ -300,7 +300,7 @@ mod test {
// test decryption works
// this should pass
match decrypt(e1, &key1) {
- Err(e) => panic!("failed to decrypt, got {}", e),
+ Err(e) => panic!("failed to decrypt, got {e}"),
Ok(h) => assert_eq!(h, history),
};
diff --git a/crates/atuin-client/src/import/bash.rs b/crates/atuin-client/src/import/bash.rs
index 2c4b29b8..99a44a58 100644
--- a/crates/atuin-client/src/import/bash.rs
+++ b/crates/atuin-client/src/import/bash.rs
@@ -111,11 +111,11 @@ impl<'a> From<&'a [u8]> for LineType<'a> {
if line.is_empty() {
return LineType::Empty;
}
- let parsed = match try_parse_line_as_timestamp(line) {
+
+ match try_parse_line_as_timestamp(line) {
Some(time) => LineType::Timestamp(time),
None => LineType::Command(line),
- };
- parsed
+ }
}
}
diff --git a/crates/atuin-client/src/theme.rs b/crates/atuin-client/src/theme.rs
index 429f08ab..b53c2e7a 100644
--- a/crates/atuin-client/src/theme.rs
+++ b/crates/atuin-client/src/theme.rs
@@ -198,7 +198,7 @@ fn from_string(name: &str) -> Result<Color, String> {
// For full flexibility, we need to use serde_json, given
// crossterm's approach.
serde_json::from_str::<Color>(format!("\"{}\"", &name[1..]).as_str())
- .map_err(|_| format!("Could not convert color name {} to Crossterm color", name))
+ .map_err(|_| format!("Could not convert color name {name} to Crossterm color"))
}
_ => {
let srgb = named::from_str(name).ok_or("No such color in palette")?;
@@ -382,7 +382,7 @@ impl ThemeManager {
theme_file
};
- let theme_toml = format!["{}.toml", name];
+ let theme_toml = format!["{name}.toml"];
theme_file.push(theme_toml);
let mut config_builder = Config::builder();
@@ -797,8 +797,7 @@ mod theme_tests {
assert_eq!(
from_string(inp),
Err(format!(
- "Could not convert color name {} to Crossterm color",
- inp
+ "Could not convert color name {inp} to Crossterm color"
))
);
});