1
Fork 0

Rollup merge of #118288 - compiler-errors:is_some_and, r=lqd,dtolnay

Use `is_{some,ok}_and` more in the compiler

slightly more fluent-reading code
This commit is contained in:
Michael Goulet 2023-11-25 17:23:34 -05:00 committed by GitHub
commit 8dd8db5073
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 13 deletions

View file

@ -1869,7 +1869,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
),
};
fields.map_or(false, |fields| {
fields.is_some_and(|fields| {
fields
.iter()
.filter(|vis| !self.r.is_accessible_from(**vis, self.parent_scope.module))