mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Auto-fixed clippy::needless_borrow
`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear. See https://rust-lang.github.io/rust-clippy/master/index.html#/needless_borrow ``` __CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::needless_borrow cargo fmt --all ```
This commit is contained in:
parent
bcb2953f00
commit
6324b35e94
26 changed files with 59 additions and 59 deletions
|
@ -259,7 +259,7 @@ impl JsComponentInstance {
|
|||
let args = arguments
|
||||
.into_iter()
|
||||
.zip(args.into_iter())
|
||||
.map(|(a, ty)| super::value::to_value(&env, a, &ty))
|
||||
.map(|(a, ty)| super::value::to_value(&env, a, ty))
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
if args.len() != count {
|
||||
return Err(napi::Error::from_reason(
|
||||
|
|
|
@ -253,7 +253,7 @@ pub fn to_value(env: &Env, unknown: JsUnknown, typ: &Type) -> Result<Value> {
|
|||
)))))
|
||||
} else {
|
||||
let rust_model =
|
||||
unknown.coerce_to_object().and_then(|obj| js_into_rust_model(env, &obj, &a))?;
|
||||
unknown.coerce_to_object().and_then(|obj| js_into_rust_model(env, &obj, a))?;
|
||||
Ok(Value::Model(rust_model))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue