clippy: fix several lint warns (#32126)

As seems #31500 still remain opened here's the next partial fix.

Fixed list: `unused_mut`, `clippy::needless_borrow`,
`clippy::match_ref_pats`, `clippy::borrow_deref_ref`, `clippy::ptr_eq`,
`clippy::unnecessary_cast`, `clippy::derivable_impls`,
`clippy::collapsible_match`, `clippy::extra_unused_lifetimes`,
`clippy::map_clone`, `clippy::manual_filter`.


- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes are part of #31500.
- [x] These changes do not require tests because are only cosmetic.
This commit is contained in:
Kitsu 2024-04-22 03:45:39 -03:00 committed by GitHub
parent 025a987732
commit 67f239d1ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 54 additions and 83 deletions

View file

@ -264,16 +264,8 @@ impl Event {
}
}
let timeline_window = match DomRoot::downcast::<Window>(target.global()) {
Some(window) => {
if window.need_emit_timeline_marker(TimelineMarkerType::DOMEvent) {
Some(window)
} else {
None
}
},
_ => None,
};
let timeline_window = DomRoot::downcast::<Window>(target.global())
.filter(|window| window.need_emit_timeline_marker(TimelineMarkerType::DOMEvent));
// Step 5.13
for object in event_path.iter().rev() {