We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9a57617 + 42b9d3f commit b3bcf4aCopy full SHA for b3bcf4a
compiler/rustc_data_structures/src/obligation_forest/mod.rs
@@ -342,7 +342,7 @@ impl<O: ForestObligation> ObligationForest<O> {
342
return Ok(());
343
}
344
345
- match self.active_cache.entry(cache_key.clone()) {
+ match self.active_cache.entry(cache_key) {
346
Entry::Occupied(o) => {
347
let node = &mut self.nodes[*o.get()];
348
if let Some(parent_index) = parent {
@@ -366,8 +366,7 @@ impl<O: ForestObligation> ObligationForest<O> {
366
&& self
367
.error_cache
368
.get(&obligation_tree_id)
369
- .map(|errors| errors.contains(&cache_key))
370
- .unwrap_or(false);
+ .map_or(false, |errors| errors.contains(v.key()));
371
372
if already_failed {
373
Err(())
0 commit comments