chore: a few minor lints

* do not use `&` for the format args as it cannot (yet) be optimized by the compiler
* a few format inlining
This commit is contained in:
Yuri Astrakhan 2025-01-21 00:13:50 -05:00 committed by Amaan Qureshi
parent c8353a52af
commit 9dbe165296
11 changed files with 32 additions and 36 deletions

View file

@ -93,9 +93,9 @@ impl Config {
};
let content = fs::read_to_string(&location)
.with_context(|| format!("Failed to read {}", &location.to_string_lossy()))?;
.with_context(|| format!("Failed to read {}", location.to_string_lossy()))?;
let config = serde_json::from_str(&content)
.with_context(|| format!("Bad JSON config {}", &location.to_string_lossy()))?;
.with_context(|| format!("Bad JSON config {}", location.to_string_lossy()))?;
Ok(Self { location, config })
}