pub fn fill_with(map: &mut Map, map2: Map) {
        if !map2.is_empty() {
            if map.is_empty() {
                *map = map2;
            } else {
                map2.into_iter().for_each(|(key, value)| {
                    map.entry(key).or_insert(value);
                });
            }
        }
    }
/// Add all property values of another object map into the object map.
/// Only properties that do not originally exist in the object map are added.
///
/// # Example
///
/// ```rhai
/// let m = #{a:1, b:2, c:3};
/// let n = #{a: 42, d:0};
///
/// m.fill_with(n);
///
/// print(m);       // prints "#{a:1, b:2, c:3, d:0}"
/// ```
Add all property values of another object map into the object map.
Only properties that do not originally exist in the object map are added.
Add all property values of another object map into the object map . Only properties that do not originally exist in the object map are added .
pub fn fill_with(map: &mut Map, map2: Map) {
        if !map2.is_empty() {
            if map.is_empty() {
                *map = map2;
            } else {
                map2.into_iter().for_each(|(key, value)| {
                    map.entry(key).or_insert(value);
                });
            }
        }
    }
pub fn fill_with ( map : & mut Map , map2 : Map ) { if ! map2 . is_empty ( ) { if map . is_empty ( ) { * map = map2 ; } else { map2 . into_iter ( ) . for_each ( | ( key , value ) | { map . entry ( key ) . or_insert ( value ) ; } ) ; } } }
Add all property values of another object map into the object map.
Add all property values of another object map into the object map .
map
&mut Map
map2
Map
example
None