mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
clippy: Fix toplevel_ref_arg
warning in components/script
(#31984)
* clippy: Fix toplevel_ref_arg warnings * refactor: Make the let binding more idiomatic
This commit is contained in:
parent
37cf4cf207
commit
fcc7a1be53
1 changed files with 2 additions and 3 deletions
|
@ -731,9 +731,8 @@ impl EventTarget {
|
|||
listener: Option<Rc<EventListener>>,
|
||||
options: EventListenerOptions,
|
||||
) {
|
||||
let ref listener = match listener {
|
||||
Some(l) => l,
|
||||
None => return,
|
||||
let Some(ref listener) = listener else {
|
||||
return;
|
||||
};
|
||||
let mut handlers = self.handlers.borrow_mut();
|
||||
let entry = handlers.get_mut(&Atom::from(ty));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue