clippy: Fix collapsible_else_if warnings (#31853)

This commit is contained in:
Oluwatobi Sofela 2024-03-26 10:15:04 +01:00 committed by GitHub
parent d814d05539
commit f8a2eaea47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 37 additions and 52 deletions

View file

@ -82,12 +82,10 @@ impl<'dom, LayoutDataType: LayoutDataTrait> fmt::Debug for ServoLayoutNode<'dom,
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if let Some(el) = self.as_element() {
el.fmt(f)
} else if self.is_text_node() {
write!(f, "<text node> ({:#x})", self.opaque().0)
} else {
if self.is_text_node() {
write!(f, "<text node> ({:#x})", self.opaque().0)
} else {
write!(f, "<non-text node> ({:#x})", self.opaque().0)
}
write!(f, "<non-text node> ({:#x})", self.opaque().0)
}
}
}