pub fn zip_fix_right(&mut self) -> bool {
        if let Node::Internal(ref mut children) = *self {
            let mut did_stuff = false;
            loop {
                let last_i = children.len() - 1;
                let do_merge = (children.len() > 1)
                    && match *children.nodes()[last_i] {
                        Node::Leaf(ref text) => text.len() < MIN_BYTES,
                        Node::Internal(ref children2) => children2.len() < MIN_CHILDREN,
                    };

                if do_merge {
                    did_stuff |= children.merge_distribute(last_i - 1, last_i);
                }

                if !Arc::make_mut(&mut children.nodes_mut().last_mut().unwrap()).zip_fix_right() {
                    break;
                }
            }
            did_stuff
        } else {
            false
        }
    }
/// Fixes dangling nodes down the right side of the tree.
///
/// Returns whether it did anything or not that would affect the
/// parent. True: did stuff, false: didn't do stuff
Fixes dangling nodes down the right side of the tree.
Returns whether it did anything or not that would affect the
parent. True: did stuff, false: didn't do stuff
Fixes dangling nodes down the right side of the tree . Returns whether it did anything or not that would affect the parent . True : did stuff false : didn ' t do stuff
pub fn zip_fix_right(&mut self) -> bool {
        if let Node::Internal(ref mut children) = *self {
            let mut did_stuff = false;
            loop {
                let last_i = children.len() - 1;
                let do_merge = (children.len() > 1)
                    && match *children.nodes()[last_i] {
                        Node::Leaf(ref text) => text.len() < MIN_BYTES,
                        Node::Internal(ref children2) => children2.len() < MIN_CHILDREN,
                    };
                if do_merge {
                    did_stuff |= children.merge_distribute(last_i - 1, last_i);
                }
                if !Arc::make_mut(&mut children.nodes_mut().last_mut().unwrap()).zip_fix_right() {
                    break;
                }
            }
            did_stuff
        } else {
            false
        }
    }
pub fn zip_fix_right ( & mut self ) -> bool { if let Node :: Internal ( ref mut children ) = * self { let mut did_stuff = false ; loop { let last_i = children . len ( ) - 1 ; let do_merge = ( children . len ( ) > 1 ) && match * children . nodes ( ) [ last_i ] { Node :: Leaf ( ref text ) => text . len ( ) < MIN_BYTES , Node :: Internal ( ref children2 ) => children2 . len ( ) < MIN_CHILDREN , } ; if do_merge { did_stuff |= children . merge_distribute ( last_i - 1 , last_i ) ; } if ! Arc :: make_mut ( & mut children . nodes_mut ( ) . last_mut ( ) . unwrap ( ) ) . zip_fix_right ( ) { break ; } } did_stuff } else { false } }
Fixes dangling nodes down the right side of the tree.
Fixes dangling nodes down the right side of the tree .
&mut self