flip the colors of a node and its two children
(h: Option<NonNull<Node<K, V>>>)
| 333 | |
| 334 | /// flip the colors of a node and its two children |
| 335 | fn flip_colors<K, V>(h: Option<NonNull<Node<K, V>>>) { |
| 336 | let mut h = NodeQuery::new(h); |
| 337 | h.flip_color(); |
| 338 | h.left().flip_color(); |
| 339 | h.right().flip_color(); |
| 340 | } |
| 341 | |
| 342 | /// restore red-black tree invariant |
| 343 | fn balance<K, V>(h: Option<NonNull<Node<K, V>>>) -> Option<NonNull<Node<K, V>>> { |
no test coverage detected