Use is_some_and
/is_ok_and
in less obvious spots
This commit is contained in:
parent
fb0f74a8c9
commit
307799a711
19 changed files with 53 additions and 88 deletions
|
@ -348,7 +348,7 @@ impl<'a> AstValidator<'a> {
|
|||
let source_map = self.session.source_map();
|
||||
let end = source_map.end_point(sp);
|
||||
|
||||
if source_map.span_to_snippet(end).map(|s| s == ";").unwrap_or(false) {
|
||||
if source_map.span_to_snippet(end).is_ok_and(|s| s == ";") {
|
||||
end
|
||||
} else {
|
||||
sp.shrink_to_hi()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue