Rollup merge of #111912 - WaffleLapkin:is_some_and_in_the_compiler, r=petrochenkov
Use `Option::is_some_and` and `Result::is_ok_and` in the compiler `.is_some_and(..)`/`.is_ok_and(..)` replace `.map_or(false, ..)` and `.map(..).unwrap_or(false)`, making the code more readable. This PR is a sibling of https://github.com/rust-lang/rust/pull/111873#issuecomment-1561316515
This commit is contained in:
commit
d0b3ebee66
97 changed files with 201 additions and 246 deletions
|
@ -366,7 +366,7 @@ impl<O: ForestObligation> ObligationForest<O> {
|
|||
&& self
|
||||
.error_cache
|
||||
.get(&obligation_tree_id)
|
||||
.map_or(false, |errors| errors.contains(v.key()));
|
||||
.is_some_and(|errors| errors.contains(v.key()));
|
||||
|
||||
if already_failed {
|
||||
Err(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue