Skip to content

Commit 3e182f6

Browse files
committed
fix some clippy lints
1 parent 460a3a4 commit 3e182f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

parser/src/lex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ impl<'a> Lexer<'a> {
11431143
let subscript = {
11441144
if self.next_char_exact(",") || self.next_chars_exact(["_"; 2]) {
11451145
Some(self.subscript(","))
1146-
} else if self.peek_char().map_or(false, is_formatted_subscript) {
1146+
} else if self.peek_char().is_some_and(is_formatted_subscript) {
11471147
let init = self.next_char().unwrap();
11481148
Some(self.subscript(init))
11491149
} else {
@@ -1158,7 +1158,7 @@ impl<'a> Lexer<'a> {
11581158
let (m, before_last_2nd_chain) = read_chain(&mut self);
11591159
let has_2nd_subscript = self.next_char_exact(",")
11601160
|| self.next_chars_exact(["_"; 2])
1161-
|| self.peek_char().map_or(false, is_formatted_subscript);
1161+
|| self.peek_char().is_some_and(is_formatted_subscript);
11621162
if !has_2nd_subscript {
11631163
self.end(Subscr(Subscript::numeric(n + num + m)), start);
11641164
} else {

0 commit comments

Comments
 (0)