Skip to content

Commit 42b9d3f

Browse files
committed
Simplify map | unwrap_or to map_or
1 parent a36c636 commit 42b9d3f

File tree

1 file changed

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

1 file changed

+1
-2
lines changed

compiler/rustc_data_structures/src/obligation_forest/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,7 @@ impl<O: ForestObligation> ObligationForest<O> {
366366
&& self
367367
.error_cache
368368
.get(&obligation_tree_id)
369-
.map(|errors| errors.contains(v.key()))
370-
.unwrap_or(false);
369+
.map_or(false, |errors| errors.contains(v.key()));
371370

372371
if already_failed {
373372
Err(())

0 commit comments

Comments
 (0)