1
0
Fork 0
forked from wry/wry

autocommit 2022-05-01 17:23:55 CEST

This commit is contained in:
Julian Orth 2022-05-01 17:23:55 +02:00
parent 4373ed05bf
commit e1d5bf0e5d
39 changed files with 1772 additions and 57 deletions

View file

@ -37,10 +37,8 @@ impl<K: Eq + Hash, V> CopyHashMap<K, V> {
Self::default()
}
pub fn set(&self, k: K, v: V) {
unsafe {
self.map.get().deref_mut().insert(k, v);
}
pub fn set(&self, k: K, v: V) -> Option<V> {
unsafe { self.map.get().deref_mut().insert(k, v) }
}
pub fn get<Q: ?Sized>(&self, k: &Q) -> Option<V>