RS.CLIPPY.IS_DIGIT_ASCII_RADIX

Use of `char::is_digit(..)` with literal radix of 10 or 16

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: is_digit_ascii_radix. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Finds usages of char::is_digit that can be replaced with is_ascii_digit or is_ascii_hexdigit.

Why is this bad?

is_digit(..) is slower and requires specifying the radix.

Example

let c: char = \'6\';
c.is_digit(10);
c.is_digit(16);

Use instead:

let c: char = \'6\';
c.is_ascii_digit();
c.is_ascii_hexdigit();