From 8375e0914a820ff779c82dbd5a5ac5a3cf65a6e1 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 24 Jun 2015 20:58:19 +0200 Subject: [PATCH] Simplify ThreadSafeLayoutNodeChildrenIterator::next a bit. --- components/layout/wrapper.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index daaeadaae30..561d750a754 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -1012,15 +1012,15 @@ impl<'a> Iterator for ThreadSafeLayoutNodeChildrenIterator<'a> { match self.parent_node { Some(ref parent_node) => { - if parent_node.pseudo == PseudoElementType::Normal { - self.current_node = self.current_node.clone().and_then(|node| { + self.current_node = if parent_node.pseudo == PseudoElementType::Normal { + self.current_node.clone().and_then(|node| { unsafe { node.next_sibling() } - }); + }) } else { - self.current_node = None; - } + None + }; } None => {} }