mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
fix: clean up warnings
Change-Id: I91a468f6e846ac28574825b8ee7aa02fbff68f63
This commit is contained in:
parent
354be0ae8a
commit
44363cd5d2
3 changed files with 6 additions and 6 deletions
|
@ -16,7 +16,7 @@ pub(crate) fn scan_number(c: char, ptr: &mut Ptr) -> SyntaxKind {
|
|||
ptr.bump();
|
||||
scan_digits(ptr, true);
|
||||
}
|
||||
'0'...'9' | '_' | '.' | 'e' | 'E' => {
|
||||
'0'..='9' | '_' | '.' | 'e' | 'E' => {
|
||||
scan_digits(ptr, true);
|
||||
}
|
||||
_ => return INT_NUMBER,
|
||||
|
@ -47,10 +47,10 @@ pub(crate) fn scan_number(c: char, ptr: &mut Ptr) -> SyntaxKind {
|
|||
fn scan_digits(ptr: &mut Ptr, allow_hex: bool) {
|
||||
while let Some(c) = ptr.current() {
|
||||
match c {
|
||||
'_' | '0'...'9' => {
|
||||
'_' | '0'..='9' => {
|
||||
ptr.bump();
|
||||
}
|
||||
'a'...'f' | 'A'...'F' if allow_hex => {
|
||||
'a'..='f' | 'A'..='F' if allow_hex => {
|
||||
ptr.bump();
|
||||
}
|
||||
_ => return,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue