mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Fix busted iterator.
This commit is contained in:
parent
2b44efbbef
commit
52e8a9be28
1 changed files with 2 additions and 1 deletions
|
@ -410,11 +410,12 @@ impl<'self, View> AbstractNode<View> {
|
||||||
|
|
||||||
impl<View> Iterator<AbstractNode<View>> for AbstractNodeChildrenIterator<View> {
|
impl<View> Iterator<AbstractNode<View>> for AbstractNodeChildrenIterator<View> {
|
||||||
pub fn next(&mut self) -> Option<AbstractNode<View>> {
|
pub fn next(&mut self) -> Option<AbstractNode<View>> {
|
||||||
|
let node = self.current_node;
|
||||||
self.current_node = match self.current_node {
|
self.current_node = match self.current_node {
|
||||||
None => None,
|
None => None,
|
||||||
Some(node) => node.next_sibling(),
|
Some(node) => node.next_sibling(),
|
||||||
};
|
};
|
||||||
self.current_node
|
node
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue