inline format arguments

In a few cases, removed the unneeded `&` - this causes a minor slowdown because compiler cannot eliminate those (yet).
This commit is contained in:
Yuri Astrakhan authored and Martin Nordholts committed 2025-08-19 05:07:54 +02:00
1 parent 9824090654
commit d9fbd18541
14 files changed
+32 -45

No files matched your search

+3 -4
View File
@@ -191,11 +191,11 @@ impl HighlightingAssets {
Some(theme) => theme,
None => {
if theme == "ansi-light" || theme == "ansi-dark" {
bat_warning!("Theme '{}' is deprecated, using 'ansi' instead.", theme);
bat_warning!("Theme '{theme}' is deprecated, using 'ansi' instead.");
return self.get_theme("ansi");
}
if !theme.is_empty() {
bat_warning!("Unknown theme '{}', using default.", theme)
bat_warning!("Unknown theme '{theme}', using default.")
}
self.get_theme_set()
.get(
@@ -354,8 +354,7 @@ fn asset_from_cache<T: serde::de::DeserializeOwned>(
) -> Result<T> {
let contents = fs::read(path).map_err(|_| {
format!(
"Could not load cached {} '{}'",
description,
"Could not load cached {description} '{}'",
path.to_string_lossy()
)
})?;