Skip to content

Commit

Permalink
Avoid cloning cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed May 18, 2021
1 parent 5f10d31 commit a36c636
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_data_structures/src/obligation_forest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit a36c636

Please sign in to comment.