/// Returns a map containing the same entries as before,
/// except for the key, which is unbound in the returned map.
Returns a map containing the same entries as before,
except for the key, which is unbound in the returned map.
Returns a map containing the same entries as before except for the key which is unbound in the returned map .
pub fn remove<A: Arena>(self, arena: &'a A, x: &K) -> Self {
        match self {
            Map(None) => Map(None),
            Map(Some(Node(l, v, d, r, _))) => match x.cmp(v) {
                Ordering::Equal => merge(arena, *l, *r),
                Ordering::Less => bal(arena, l.remove(arena, x), v.clone(), d.clone(), *r),
                Ordering::Greater => bal(arena, *l, v.clone(), d.clone(), r.remove(arena, x)),
            },
        }
    }
pub fn remove < A : Arena > ( self , arena : & ' a A , x : & K ) -> Self { match self { Map ( None ) => Map ( None ) , Map ( Some ( Node ( l , v , d , r , _ ) ) ) => match x . cmp ( v ) { Ordering :: Equal => merge ( arena , * l , * r ) , Ordering :: Less => bal ( arena , l . remove ( arena , x ) , v . clone ( ) , d . clone ( ) , * r ) , Ordering :: Greater => bal ( arena , * l , v . clone ( ) , d . clone ( ) , r . remove ( arena , x ) ) , } , } }
Returns a map containing the same entries as before,
except for the key, which is unbound in the returned map.
Returns a map containing the same entries as before except for the key which is unbound in the returned map .
self
arena
&'a A
x
&K