// Returns the largest key in the given tree.
// If the tree is empty, then it returns `None`.
Returns the largest key in the given tree.
If the tree is empty, then it returns `None`.
Returns the largest key in the given tree . If the tree is empty then it returns ` None ` .
fn max_key(&self) -> Option<u64> {
        let mut node = self;
        loop {
            match node {
                Tree::Empty => {
                    return None;
                }
                Tree::Leaf(k, _) => {
                    return Some(*k);
                }
                Tree::Branch {
                    prefix: _,
                    branching_bit: _,
                    left: _,
                    right,
                } => {
                    node = right.as_ref();
                }
            }
        }
    }
fn max_key ( & self ) -> Option < u64 > { let mut node = self ; loop { match node { Tree :: Empty => { return None ; } Tree :: Leaf ( k , _ ) => { return Some ( * k ) ; } Tree :: Branch { prefix : _ , branching_bit : _ , left : _ , right , } => { node = right . as_ref ( ) ; } } } }
Returns the largest key in the given tree.
Returns the largest key in the given tree .
&self