Rollup merge of #85436 - tamird:save-clone, r=estebank
Avoid cloning cache key r? `@estebank`
This commit is contained in:
commit
b3bcf4af74
@ -342,7 +342,7 @@ fn register_obligation_at(&mut self, obligation: O, parent: Option<usize>) -> Re
|
||||
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,8 +366,7 @@ fn register_obligation_at(&mut self, obligation: O, parent: Option<usize>) -> Re
|
||||
&& self
|
||||
.error_cache
|
||||
.get(&obligation_tree_id)
|
||||
.map(|errors| errors.contains(&cache_key))
|
||||
.unwrap_or(false);
|
||||
.map_or(false, |errors| errors.contains(v.key()));
|
||||
|
||||
if already_failed {
|
||||
Err(())
|
||||
|
Loading…
Reference in New Issue
Block a user