clippy: Fix needless borrow warnings (#31813)

This commit is contained in:
Oluwatobi Sofela 2024-03-21 18:48:54 +01:00 committed by GitHub
parent 694e86ecff
commit 3e63f8d6ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 151 additions and 157 deletions

View file

@ -259,7 +259,7 @@ impl DocumentOrShadowRoot {
self, to_unregister, id
);
let mut id_map = id_map.borrow_mut();
let is_empty = match id_map.get_mut(&id) {
let is_empty = match id_map.get_mut(id) {
None => false,
Some(elements) => {
let position = elements
@ -271,7 +271,7 @@ impl DocumentOrShadowRoot {
},
};
if is_empty {
id_map.remove(&id);
id_map.remove(id);
}
}