clippy: Fix op_ref warnings (#31900)

This commit is contained in:
Oluwatobi Sofela 2024-03-27 17:45:58 +01:00 committed by GitHub
parent 773e881971
commit da518823ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 15 additions and 19 deletions

View file

@ -638,7 +638,7 @@ pub fn get_desired_proto(
// constructor. CheckedUnwrapStatic is fine here, because we're looking for
// DOM constructors and those can't be cross-origin objects.
*new_target = CheckedUnwrapStatic(*new_target);
if !new_target.is_null() && &*new_target != &*original_new_target {
if !new_target.is_null() && *new_target != *original_new_target {
get_proto_id_for_new_target(new_target.handle())
} else {
None
@ -649,7 +649,7 @@ 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 && !JS_WrapObject(*cx, desired_proto.into()) {
if *new_target != *original_new_target && !JS_WrapObject(*cx, desired_proto.into()) {
return Err(());
}
return Ok(());