Skip to content

Commit a36c636

Browse files
committed
Avoid cloning cache key
1 parent 5f10d31 commit a36c636

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_data_structures/src/obligation_forest

1 file changed

+2
-2
lines changed

compiler/rustc_data_structures/src/obligation_forest/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ impl<O: ForestObligation> ObligationForest<O> {
342342
return Ok(());
343343
}
344344

345-
match self.active_cache.entry(cache_key.clone()) {
345+
match self.active_cache.entry(cache_key) {
346346
Entry::Occupied(o) => {
347347
let node = &mut self.nodes[*o.get()];
348348
if let Some(parent_index) = parent {
@@ -366,7 +366,7 @@ impl<O: ForestObligation> ObligationForest<O> {
366366
&& self
367367
.error_cache
368368
.get(&obligation_tree_id)
369-
.map(|errors| errors.contains(&cache_key))
369+
.map(|errors| errors.contains(v.key()))
370370
.unwrap_or(false);
371371

372372
if already_failed {

0 commit comments

Comments
 (0)