fn rotate_left(mut root: Box<Node>) -> Box<Node> {
        let mut new_root = root.right.take().unwrap();
        root.right = new_root.left.take();
        root.update_fields();
        new_root.left = Some(root);
        new_root.update_fields();
        new_root
    }
/// Left rotation. Returns the new root.
Left rotation. Returns the new root.
Left rotation . Returns the new root .
fn rotate_left(mut root: Box<Node>) -> Box<Node> {
        let mut new_root = root.right.take().unwrap();
        root.right = new_root.left.take();
        root.update_fields();
        new_root.left = Some(root);
        new_root.update_fields();
        new_root
    }
fn rotate_left ( mut root : Box < Node > ) -> Box < Node > { let mut new_root = root . right . take ( ) . unwrap ( ) ; root . right = new_root . left . take ( ) ; root . update_fields ( ) ; new_root . left = Some ( root ) ; new_root . update_fields ( ) ; new_root }
Left rotation.
Left rotation .
root
Box<Node>
root
Box<Node>