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:
parent
c8353a52af
commit
9dbe165296
11 changed files with 32 additions and 36 deletions
|
|
@ -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 })
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue