(&mut self)
| 509 | } |
| 510 | |
| 511 | fn iter_mut<'a>(&mut self) -> IterMut<'a, K, V> { |
| 512 | let mut iterator = IterMut { stack: Vec::new() }; |
| 513 | let mut node = self.root; |
| 514 | unsafe { |
| 515 | while !node.is_null() { |
| 516 | iterator.stack.push(&mut *node); |
| 517 | node = (*node).left; |
| 518 | } |
| 519 | } |
| 520 | iterator |
| 521 | } |
| 522 | } |
| 523 | |
| 524 | // 实现迭代功能 |