aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_dom/node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/layout_dom/node.rs')
-rw-r--r--components/script/layout_dom/node.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/components/script/layout_dom/node.rs b/components/script/layout_dom/node.rs
index ae9d8ec00d1..a941009dcda 100644
--- a/components/script/layout_dom/node.rs
+++ b/components/script/layout_dom/node.rs
@@ -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)
}
}
}