Avoid cloning cache key

This commit is contained in:
Tamir Duberstein 2021-05-18 07:48:00 -04:00
parent 5f10d310f4
commit a36c636199
No known key found for this signature in database
GPG Key ID: 32E33EC15E1FEF3C

View File

@ -342,7 +342,7 @@ impl<O: ForestObligation> ObligationForest<O> {
return Ok(());
}
match self.active_cache.entry(cache_key.clone()) {
match self.active_cache.entry(cache_key) {
Entry::Occupied(o) => {
let node = &mut self.nodes[*o.get()];
if let Some(parent_index) = parent {
@ -366,7 +366,7 @@ impl<O: ForestObligation> ObligationForest<O> {
&& self
.error_cache
.get(&obligation_tree_id)
.map(|errors| errors.contains(&cache_key))
.map(|errors| errors.contains(v.key()))
.unwrap_or(false);
if already_failed {