A few more format arg inlining

Used these commands and some manual searching

```
cargo clippy --fix  --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::uninlined_format_args
cargo clippy --all-targets -- -A clippy::all -W clippy::uninlined_format_args
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
This commit is contained in:
Yuri Astrakhan 2025-02-06 01:57:43 -05:00 committed by Olivier Goffart
parent 5356fdcf89
commit 4ae2627ade
26 changed files with 61 additions and 84 deletions

View file

@ -198,8 +198,7 @@ pub fn to_value(env: &Env, unknown: JsUnknown, typ: &Type) -> Result<Value> {
let expected_size: usize = (width as usize) * (height as usize) * BPP;
if actual_size != expected_size {
return Err(napi::Error::from_reason(format!(
"data property does not have the correct size; expected {} (width) * {} (height) * {} = {}; got {}",
width, height, BPP, actual_size, expected_size
"data property does not have the correct size; expected {width} (width) * {height} (height) * {BPP} = {actual_size}; got {expected_size}"
)));
}
@ -244,8 +243,7 @@ pub fn to_value(env: &Env, unknown: JsUnknown, typ: &Type) -> Result<Value> {
vec.push(to_value(
env,
array.get(i)?.ok_or(napi::Error::from_reason(format!(
"Cannot access array element at index {}",
i
"Cannot access array element at index {i}"
)))?,
a,
)?);