Skip to main content

rebase_map

Function rebase_map 

Source
fn rebase_map<K, V>(
    base: &HashMap<K, V>,
    own: &HashMap<K, V>,
    removed: impl IntoIterator<Item = K>,
    added: impl IntoIterator<Item = K>,
) -> HashMap<K, V>
where K: Clone + Eq + Hash + Debug, V: Clone + Eq + Debug,
Expand description

Returns base without the removed keys, and with the added keys and their values in own.

The result shares its other entries with base. In tests, it must equal own.