mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-12 08:30:51 +00:00
remove needless clone
This commit is contained in:
parent
76f153e35e
commit
1faa9d6016
1 changed files with 3 additions and 4 deletions
|
@ -140,10 +140,9 @@ where
|
|||
DB: Database,
|
||||
{
|
||||
fn try_fetch(&self, db: &DB, key: &Q::Key) -> Result<Q::Value, CycleDetected> {
|
||||
let slot = match self.slot(key) {
|
||||
Some(s) => s.clone(),
|
||||
None => panic!("no value set for {:?}({:?})", Q::default(), key),
|
||||
};
|
||||
let slot = self.slot(key).unwrap_or_else(|| {
|
||||
panic!("no value set for {:?}({:?})", Q::default(), key)
|
||||
});
|
||||
|
||||
let StampedValue { value, changed_at } = slot.stamped_value.read().clone();
|
||||
|
||||
|
|
Loading…
Reference in a new issue