clippy: is_digit(10) -> is_ascii_digit() (#25428)

This commit is contained in:
Brooks Prumo 2022-05-21 07:03:11 -05:00 committed by GitHub
parent 7fb0ef1fa5
commit e9a6d1ecef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -345,7 +345,7 @@ fn all_digits(v: &str) -> bool {
return false;
}
for x in v.chars() {
if !x.is_digit(10) {
if !x.is_ascii_digit() {
return false;
}
}
@ -356,7 +356,7 @@ fn like_storage(v: &str) -> bool {
let mut periods = 0;
let mut saw_numbers = false;
for x in v.chars() {
if !x.is_digit(10) {
if !x.is_ascii_digit() {
if x == '.' {
if periods > 0 || !saw_numbers {
return false;