clippy: Fix several warnings (#31710)

Signed-off-by: RustAndMetal <111676747+RustAndMetal@users.noreply.github.com>
This commit is contained in:
RustAndMetal 2024-03-18 09:33:43 +01:00 committed by GitHub
parent 1ab8fa2895
commit f6a975fc58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 75 additions and 86 deletions

View file

@ -76,8 +76,8 @@ impl NonCallbackInterfaceObjectClass {
ext: 0 as *const _,
oOps: &OBJECT_OPS,
},
proto_id: proto_id,
proto_depth: proto_depth,
proto_id,
proto_depth,
representation: string_rep,
}
}
@ -649,10 +649,8 @@ pub fn get_desired_proto(
let global = GetNonCCWObjectGlobal(*new_target);
let proto_or_iface_cache = get_proto_or_iface_array(global);
desired_proto.set((*proto_or_iface_cache)[proto_id as usize]);
if &*new_target != &*original_new_target {
if !JS_WrapObject(*cx, desired_proto.into()) {
return Err(());
}
if &*new_target != &*original_new_target && !JS_WrapObject(*cx, desired_proto.into()) {
return Err(());
}
return Ok(());
}