mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-23 20:12:09 +03:00
Fix clippy is_digit_ascii_radix
This commit is contained in:
parent
1c8713ebe4
commit
487ab2ef53
@ -33,7 +33,7 @@ pub fn natural(reader: &mut Reader) -> ParseResult<'static, usize> {
|
||||
});
|
||||
}
|
||||
let first_digit = reader.read().unwrap();
|
||||
if !first_digit.is_digit(10) {
|
||||
if !first_digit.is_ascii_digit() {
|
||||
return Err(Error {
|
||||
pos: start.pos,
|
||||
recoverable: true,
|
||||
@ -44,7 +44,7 @@ pub fn natural(reader: &mut Reader) -> ParseResult<'static, usize> {
|
||||
}
|
||||
|
||||
let save = reader.state.clone();
|
||||
let s = reader.read_while(|c| c.is_digit(10));
|
||||
let s = reader.read_while(|c| c.is_ascii_digit());
|
||||
|
||||
// if the first digit is zero, you should not have any more digits
|
||||
if first_digit == '0' && !s.is_empty() {
|
||||
@ -79,7 +79,7 @@ pub fn number(reader: &mut Reader) -> ParseResult<'static, Number> {
|
||||
});
|
||||
}
|
||||
|
||||
let s = reader.read_while(|c| c.is_digit(10));
|
||||
let s = reader.read_while(|c| c.is_ascii_digit());
|
||||
if s.is_empty() {
|
||||
return Err(Error {
|
||||
pos: reader.clone().state.pos,
|
||||
|
@ -431,7 +431,7 @@ pub fn natural(reader: &mut Reader) -> ParseResult<'static, u64> {
|
||||
});
|
||||
}
|
||||
let first_digit = reader.read().unwrap();
|
||||
if !first_digit.is_digit(10) {
|
||||
if !first_digit.is_ascii_digit() {
|
||||
return Err(Error {
|
||||
pos: start.pos,
|
||||
recoverable: true,
|
||||
@ -442,7 +442,7 @@ pub fn natural(reader: &mut Reader) -> ParseResult<'static, u64> {
|
||||
}
|
||||
|
||||
let save = reader.state.clone();
|
||||
let s = reader.read_while(|c| c.is_digit(10));
|
||||
let s = reader.read_while(|c| c.is_ascii_digit());
|
||||
|
||||
// if the first digit is zero, you should not have any more digits
|
||||
if first_digit == '0' && !s.is_empty() {
|
||||
@ -487,7 +487,7 @@ pub fn float(reader: &mut Reader) -> ParseResult<'static, Float> {
|
||||
});
|
||||
}
|
||||
|
||||
let s = reader.read_while(|c| c.is_digit(10));
|
||||
let s = reader.read_while(|c| c.is_ascii_digit());
|
||||
if s.is_empty() {
|
||||
return Err(Error {
|
||||
pos: reader.clone().state.pos,
|
||||
|
Loading…
Reference in New Issue
Block a user