mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Simplify map | unwrap_or
to map_or
This commit is contained in:
parent
a36c636199
commit
42b9d3fb72
@ -366,8 +366,7 @@ impl<O: ForestObligation> ObligationForest<O> {
|
||||
&& self
|
||||
.error_cache
|
||||
.get(&obligation_tree_id)
|
||||
.map(|errors| errors.contains(v.key()))
|
||||
.unwrap_or(false);
|
||||
.map_or(false, |errors| errors.contains(v.key()));
|
||||
|
||||
if already_failed {
|
||||
Err(())
|
||||
|
Loading…
Reference in New Issue
Block a user