Remove a fishy Clone impl
This commit is contained in:
parent
35d06f9c74
commit
aad33198ff
4 changed files with 27 additions and 11 deletions
|
@ -7,11 +7,16 @@ use rustc_data_structures::sync::Lock;
|
|||
|
||||
use std::hash::Hash;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Cache<Key, Value> {
|
||||
hashmap: Lock<FxHashMap<Key, WithDepNode<Value>>>,
|
||||
}
|
||||
|
||||
impl<Key: Clone, Value: Clone> Clone for Cache<Key, Value> {
|
||||
fn clone(&self) -> Self {
|
||||
Self { hashmap: Lock::new(self.hashmap.borrow().clone()) }
|
||||
}
|
||||
}
|
||||
|
||||
impl<Key, Value> Default for Cache<Key, Value> {
|
||||
fn default() -> Self {
|
||||
Self { hashmap: Default::default() }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue