pub fn multimap_insert<K: Ord, V: PartialEq>(m: &mut BTreeMap<K, Vec<V>>, key: K, value: V) {
    let v = m.entry(key).or_insert_with(Vec::new);
    if !v.contains(&value) {
        v.push(value);
    }
}
/// Helper method for inserting into a BTreeMap-based multi-map
Helper method for inserting into a BTreeMap-based multi-map
Helper method for inserting into a BTreeMap - based multi - map
pub fn multimap_insert<K: Ord, V: PartialEq>(m: &mut BTreeMap<K, Vec<V>>, key: K, value: V) {
    let v = m.entry(key).or_insert_with(Vec::new);
    if !v.contains(&value) {
        v.push(value);
    }
}
pub fn multimap_insert < K : Ord , V : PartialEq > ( m : & mut BTreeMap < K , Vec < V > > , key : K , value : V ) { let v = m . entry ( key ) . or_insert_with ( Vec :: new ) ; if ! v . contains ( & value ) { v . push ( value ) ; } }
Helper method for inserting into a BTreeMap-based multi-map
Helper method for inserting into a BTreeMap - based multi - map
m
&mut BTreeMap<K, Vec<V>>
key
K
value
V