mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-27 03:16:33 +00:00
style: cleanup insert_only_chashmap.rs
(#63)
This commit is contained in:
parent
092ea34358
commit
4faa8e83e4
1 changed files with 0 additions and 10 deletions
|
@ -1,4 +1,3 @@
|
|||
// use std::borrow::Borrow;
|
||||
use std::collections::HashMap;
|
||||
use std::hash::Hash;
|
||||
use std::sync::Arc;
|
||||
|
@ -17,15 +16,6 @@ impl<K: Hash + Eq, V> InsertOnlyCHashMap<K, V> {
|
|||
}
|
||||
}
|
||||
|
||||
// #[inline]
|
||||
// pub fn get<Q: ?Sized>(&self, key: &Q) -> Option<Arc<V>>
|
||||
// where
|
||||
// K: Borrow<Q>,
|
||||
// Q: Hash + Eq,
|
||||
// {
|
||||
// self.base.lock().get(key).map(|v| Arc::clone(v))
|
||||
// }
|
||||
|
||||
#[inline]
|
||||
pub fn get_or_insert_with<F: FnOnce() -> V>(&self, key: K, default: F) -> Arc<V> {
|
||||
Arc::clone(
|
||||
|
|
Loading…
Reference in a new issue