diff options
-rw-r--r-- | components/layout/wrapper.rs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index 2c741a1461b..daaeadaae30 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -787,17 +787,12 @@ impl<'ln> ThreadSafeLayoutNode<'ln> { } let mut opt_kid = self.first_child(); - loop { - match opt_kid { - None => break, - Some(mut kid) => { - if !kid.traverse_postorder_mut(traversal) { - return false - } - unsafe { - opt_kid = kid.next_sibling() - } - } + while let Some(mut kid) = opt_kid { + if !kid.traverse_postorder_mut(traversal) { + return false + } + unsafe { + opt_kid = kid.next_sibling() } } |