Inline all format arguments where possible
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.
The change was automatically created with, so there are far less change
of an accidental typo.
```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
This commit is contained in:
@@ -55,7 +55,7 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
|
||||
|
||||
pub fn from_json<T: DeserializeOwned>(what: &'static str, json: &serde_json::Value) -> Result<T> {
|
||||
let res = serde_json::from_value(json.clone())
|
||||
.map_err(|e| format!("Failed to deserialize {}: {}; {}", what, e, json))?;
|
||||
.map_err(|e| format!("Failed to deserialize {what}: {e}; {json}"))?;
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user