mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Use if-let in set_inline_event_listener.
This commit is contained in:
parent
0b27807ad4
commit
1b50023a08
1 changed files with 2 additions and 2 deletions
|
@ -221,10 +221,10 @@ impl EventTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
if listener.is_some() {
|
if let Some(listener) = listener {
|
||||||
entries.push(EventListenerEntry {
|
entries.push(EventListenerEntry {
|
||||||
phase: ListenerPhase::Bubbling,
|
phase: ListenerPhase::Bubbling,
|
||||||
listener: EventListenerType::Inline(listener.unwrap()),
|
listener: EventListenerType::Inline(listener),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue