Fix busted iterator.

This commit is contained in:
Jack Moffitt 2013-07-19 18:39:14 -06:00
parent 2b44efbbef
commit 52e8a9be28

View file

@ -410,11 +410,12 @@ impl<'self, View> AbstractNode<View> {
impl<View> Iterator<AbstractNode<View>> for AbstractNodeChildrenIterator<View> {
pub fn next(&mut self) -> Option<AbstractNode<View>> {
let node = self.current_node;
self.current_node = match self.current_node {
None => None,
Some(node) => node.next_sibling(),
};
self.current_node
node
}
}