clippy: Fix another set of clippy problems in components/script/dom (#31909)

* a reference to a reference

* length comparison to zero

* length comparison to zero

* length comparison to zero
This commit is contained in:
Rosemary Ajayi 2024-03-28 12:33:29 +01:00 committed by GitHub
parent af358f51db
commit 18054d0737
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 19 additions and 19 deletions

View file

@ -287,7 +287,7 @@ impl DocumentOrShadowRoot {
assert!(element.upcast::<Node>().is_connected());
assert!(!id.is_empty());
let mut id_map = id_map.borrow_mut();
let elements = id_map.entry(id.clone()).or_insert(Vec::new());
let elements = id_map.entry(id.clone()).or_default();
elements.insert_pre_order(element, &root);
}
}