(&mut self)
| 528 | impl<'a, K: Ord + Debug, V> Iterator for Iter<'a, K, V> { |
| 529 | type Item = &'a RBNode<K, V>; |
| 530 | fn next(&mut self) -> Option<Self::Item> { |
| 531 | match self.stack.pop() { |
| 532 | Some(node) => { |
| 533 | let mut next = node.right; |
| 534 | unsafe { |
| 535 | while !next.is_null() { |
| 536 | self.stack.push(&*next); |
| 537 | next = (*next).left; |
| 538 | } |
| 539 | } |
| 540 | Some(node) |
| 541 | } |
| 542 | None => None, |
| 543 | } |
| 544 | } |
| 545 | } |
| 546 | |
| 547 | struct IterMut<'a, K: Ord + Debug, V> { |