fn assert_color_invariants<T>(node: &RBTreeNode<T>) {
            match node.left {
                Some(ref left) => assert_color_invariants(&left),
                None => (),
            }

            match node.right {
                Some(ref right) => assert_color_invariants(&right),
                None => (),
            }

            match node.color {
                Color::Red => assert!(!has_red_child(&node)),
                _ => (),
            }
        }
// No red node with a red child
No red node with a red child
No red node with a red child
fn assert_color_invariants<T>(node: &RBTreeNode<T>) {
            match node.left {
                Some(ref left) => assert_color_invariants(&left),
                None => (),
            }
            match node.right {
                Some(ref right) => assert_color_invariants(&right),
                None => (),
            }
            match node.color {
                Color::Red => assert!(!has_red_child(&node)),
                _ => (),
            }
        }
fn assert_color_invariants < T > ( node : & RBTreeNode < T > ) { match node . left { Some ( ref left ) => assert_color_invariants ( & left ) , None => ( ) , } match node . right { Some ( ref right ) => assert_color_invariants ( & right ) , None => ( ) , } match node . color { Color :: Red => assert ! ( has_red_child ( node ) ) , _ => ( ) , } }
No red node with a red child
No red node with a red child
node
&RBTreeNode<T>
node
&RBTreeNode<T>