Skip to content

Commit 81b7c41

Browse files
committed
restore if expression
1 parent 683a3e5 commit 81b7c41

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/parser/src/lexer.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,10 @@ where
438438
fn take_number(&mut self, radix: u32) -> Option<char> {
439439
let take_char = Lexer::<T>::is_digit_of_radix(self.window[0], radix);
440440

441-
match take_char {
442-
true => Some(self.next_char().unwrap()),
443-
_ => None,
441+
if take_char {
442+
Some(self.next_char().unwrap())
443+
} else {
444+
None
444445
}
445446
}
446447

0 commit comments

Comments
 (0)