Simplify map | unwrap_or to map_or

This commit is contained in:
Tamir Duberstein 2021-05-18 10:37:42 -04:00
parent a36c636199
commit 42b9d3fb72
No known key found for this signature in database
GPG Key ID: 32E33EC15E1FEF3C

View File

@ -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(())