mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix for loop over option warnings
This commit is contained in:
parent
ace9b32b1c
commit
a3728b8ce2
1 changed files with 2 additions and 2 deletions
|
@ -437,7 +437,7 @@ impl EventTarget {
|
|||
let mut handlers = self.handlers.borrow_mut();
|
||||
|
||||
let listener = EventListenerType::Additive(listener.clone());
|
||||
for entries in handlers.get_mut(ty) {
|
||||
if let Some(entries) = handlers.get_mut(ty) {
|
||||
entries.drain_filter(|e| e.listener == listener && e.once);
|
||||
}
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ impl EventTarget {
|
|||
};
|
||||
let mut handlers = self.handlers.borrow_mut();
|
||||
let entry = handlers.get_mut(&Atom::from(ty));
|
||||
for entry in entry {
|
||||
if let Some(entry) = entry {
|
||||
let phase = if options.capture {
|
||||
ListenerPhase::Capturing
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue