swc_core::ecma::utils::swc_common::sync

Trait HashMapExt

pub trait HashMapExt<K, V> {
    // Required method
    fn insert_same(&mut self, key: K, value: V);
}
Available on crate features __ecma and __utils only.

Required Methods§

fn insert_same(&mut self, key: K, value: V)

Same as HashMap::insert, but it may panic if there’s already an entry for key with a value not equal to value

Implementations on Foreign Types§

§

impl<K, V, S> HashMapExt<K, V> for HashMap<K, V, S>
where K: Eq + Hash, V: Eq, S: BuildHasher,

§

fn insert_same(&mut self, key: K, value: V)

Implementors§