mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01: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
|
@ -578,17 +578,16 @@ impl HTMLFormElementMethods for HTMLFormElement {
|
|||
} else {
|
||||
a.source.cmp(&b.source)
|
||||
}
|
||||
} else if a
|
||||
.element
|
||||
.upcast::<Node>()
|
||||
.CompareDocumentPosition(b.element.upcast::<Node>()) &
|
||||
NodeConstants::DOCUMENT_POSITION_FOLLOWING ==
|
||||
NodeConstants::DOCUMENT_POSITION_FOLLOWING
|
||||
{
|
||||
std::cmp::Ordering::Less
|
||||
} else {
|
||||
if a.element
|
||||
.upcast::<Node>()
|
||||
.CompareDocumentPosition(b.element.upcast::<Node>()) &
|
||||
NodeConstants::DOCUMENT_POSITION_FOLLOWING ==
|
||||
NodeConstants::DOCUMENT_POSITION_FOLLOWING
|
||||
{
|
||||
std::cmp::Ordering::Less
|
||||
} else {
|
||||
std::cmp::Ordering::Greater
|
||||
}
|
||||
std::cmp::Ordering::Greater
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue