mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
clippy: Fix collapsible_else_if warnings (#31853)
This commit is contained in:
parent
d814d05539
commit
f8a2eaea47
8 changed files with 37 additions and 52 deletions
|
@ -579,16 +579,14 @@ impl EventTarget {
|
|||
Some(CommonEventHandler::ErrorEventHandler(unsafe {
|
||||
OnErrorEventHandlerNonNull::new(cx, funobj)
|
||||
}))
|
||||
} else if ty == &atom!("beforeunload") {
|
||||
Some(CommonEventHandler::BeforeUnloadEventHandler(unsafe {
|
||||
OnBeforeUnloadEventHandlerNonNull::new(cx, funobj)
|
||||
}))
|
||||
} else {
|
||||
if ty == &atom!("beforeunload") {
|
||||
Some(CommonEventHandler::BeforeUnloadEventHandler(unsafe {
|
||||
OnBeforeUnloadEventHandlerNonNull::new(cx, funobj)
|
||||
}))
|
||||
} else {
|
||||
Some(CommonEventHandler::EventHandler(unsafe {
|
||||
EventHandlerNonNull::new(cx, funobj)
|
||||
}))
|
||||
}
|
||||
Some(CommonEventHandler::EventHandler(unsafe {
|
||||
EventHandlerNonNull::new(cx, funobj)
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue