From e9a6d1ecefb357955f4cc612d9bdaf4925482066 Mon Sep 17 00:00:00 2001 From: Brooks Prumo Date: Sat, 21 May 2022 07:03:11 -0500 Subject: [PATCH] clippy: is_digit(10) -> is_ascii_digit() (#25428) --- runtime/src/hardened_unpack.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/src/hardened_unpack.rs b/runtime/src/hardened_unpack.rs index 87e727cd7f..fec487545b 100644 --- a/runtime/src/hardened_unpack.rs +++ b/runtime/src/hardened_unpack.rs @@ -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;