fn needs_balancing<T: ::std::fmt::Debug>(tree: &RBTreeNode<T>) -> bool {
    tree.color == Color::Black &&
        (tree.left.as_ref().map_or(false, |t| {
            t.color == Color::Red && has_red_child(&*t)
        }) ||
             tree.right.as_ref().map_or(false, |t| {
                t.color == Color::Red && has_red_child(&*t)
            }))
}
/// A tree needs balancing if it is a black node which has a red child
/// which itself has a red child.
A tree needs balancing if it is a black node which has a red child
which itself has a red child.
A tree needs balancing if it is a black node which has a red child which itself has a red child .
fn needs_balancing<T: ::std::fmt::Debug>(tree: &RBTreeNode<T>) -> bool {
    tree.color == Color::Black &&
        (tree.left.as_ref().map_or(false, |t| {
            t.color == Color::Red && has_red_child(&*t)
        }) ||
             tree.right.as_ref().map_or(false, |t| {
                t.color == Color::Red && has_red_child(&*t)
            }))
}
fn needs_balancing < T : :: std :: fmt :: Debug > ( tree : & RBTreeNode < T > ) -> bool { tree . color == Color :: Black && ( tree . left . as_ref ( ) . map_or ( false , | t | { t . color == Color :: Red && has_red_child ( & * t ) } ) || tree . right . as_ref ( ) . map_or ( false , | t | { t . color == Color :: Red && has_red_child ( & * t ) } ) ) }
A tree needs balancing if it is a black node which has a red child
which itself has a red child.
A tree needs balancing if it is a black node which has a red child which itself has a red child .
tree
&RBTreeNode<T>
tree
&RBTreeNode<T>