pub(crate) fn map_ptr_eq<K>(
    vm: &mut Vm,
    a: &BTreeMap<K, Value>,
    b: &BTreeMap<K, Value>,
) -> Result<bool, VmError>
where
    K: cmp::Eq + cmp::Ord,
    K: hash::Hash,
{
    if a.len() != b.len() {
        return Ok(false);
    }

    for (key, a) in a.iter() {
        let b = match b.get(key) {
            Some(b) => b,
            None => return Ok(false),
        };

        if !Value::value_ptr_eq(vm, a, b)? {
            return Ok(false);
        }
    }

    Ok(true)
}
/// Helper function two compare two hashmaps of values.
Helper function two compare two hashmaps of values.
Helper function two compare two hashmaps of values .
pub(crate) fn map_ptr_eq<K>(
    vm: &mut Vm,
    a: &BTreeMap<K, Value>,
    b: &BTreeMap<K, Value>,
) -> Result<bool, VmError>
where
    K: cmp::Eq + cmp::Ord,
    K: hash::Hash,
{
    if a.len() != b.len() {
        return Ok(false);
    }
    for (key, a) in a.iter() {
        let b = match b.get(key) {
            Some(b) => b,
            None => return Ok(false),
        };
        if !Value::value_ptr_eq(vm, a, b)? {
            return Ok(false);
        }
    }
    Ok(true)
}
pub ( crate ) fn map_ptr_eq < K > ( vm : & mut Vm , a : & BTreeMap < K , Value > , b : & BTreeMap < K , Value > , ) -> Result < bool , VmError > where K : cmp :: Eq + cmp :: Ord , K : hash :: Hash , { if a . len ( ) != b . len ( ) { return Ok ( false ) ; } for ( key , a ) in a . iter ( ) { let b = match b . get ( key ) { Some ( b ) => b , None => return Ok ( false ) , } ; if ! Value :: value_ptr_eq ( vm , a , b ) ? { return Ok ( false ) ; } } Ok ( true ) }
Helper function two compare two hashmaps of values.
Helper function two compare two hashmaps of values .
vm
&mut Vm
a
&BTreeMap<K, Value>
b
&BTreeMap<K, Value>
vm
&mut Vm
a
&BTreeMap<K, Value>
b
&BTreeMap<K, Value>