aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client/src/theme.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/atuin-client/src/theme.rs')
-rw-r--r--crates/atuin-client/src/theme.rs7
1 files changed, 3 insertions, 4 deletions
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"
))
);
});