pub fn make_internal_root(left_and_out: &mut Node<K,V>, b: usize, key: K, value: V,
            right: Node<K,V>) {
        let node = mem::replace(left_and_out, unsafe { Node::new_internal(capacity_from_b(b)) });
        left_and_out._len = 1;
        unsafe {
            ptr::write(left_and_out.keys_mut().get_unchecked_mut(0), key);
            ptr::write(left_and_out.vals_mut().get_unchecked_mut(0), value);
            ptr::write(left_and_out.edges_mut().get_unchecked_mut(0), node);
            ptr::write(left_and_out.edges_mut().get_unchecked_mut(1), right);
        }
    }
/// Make an internal root and swap it with an old root
Make an internal root and swap it with an old root
Make an internal root and swap it with an old root
pub fn make_internal_root(left_and_out: &mut Node<K,V>, b: usize, key: K, value: V,
            right: Node<K,V>) {
        let node = mem::replace(left_and_out, unsafe { Node::new_internal(capacity_from_b(b)) });
        left_and_out._len = 1;
        unsafe {
            ptr::write(left_and_out.keys_mut().get_unchecked_mut(0), key);
            ptr::write(left_and_out.vals_mut().get_unchecked_mut(0), value);
            ptr::write(left_and_out.edges_mut().get_unchecked_mut(0), node);
            ptr::write(left_and_out.edges_mut().get_unchecked_mut(1), right);
        }
    }
pub fn make_internal_root ( left_and_out : & mut Node < K , V > , b : usize , key : K , value : V , right : Node < K , V > ) { let node = mem :: replace ( left_and_out , unsafe { Node :: new_internal ( capacity_from_b ( b ) ) } ) ; left_and_out . _len = 1 ; unsafe { ptr :: write ( left_and_out . keys_mut ( ) . get_unchecked_mut ( 0 ) , key ) ; ptr :: write ( left_and_out . vals_mut ( ) . get_unchecked_mut ( 0 ) , value ) ; ptr :: write ( left_and_out . edges_mut ( ) . get_unchecked_mut ( 0 ) , node ) ; ptr :: write ( left_and_out . edges_mut ( ) . get_unchecked_mut ( 1 ) , right ) ; } }
Make an internal root and swap it with an old root
Make an internal root and swap it with an old root
left_and_out
&mut Node<K,V>
b
usize
key
K
value
V
right
Node<K,V>