generator: Fix clippy::is_digit_ascii_radix (#637)

This commit is contained in:
Marijn Suijten 2022-07-01 22:09:22 +02:00
parent 06443f8cf9
commit 3fafe975e0

View file

@ -1219,7 +1219,7 @@ pub fn variant_ident(enum_name: &str, variant_name: &str) -> Ident {
let is_digit = new_variant_name let is_digit = new_variant_name
.chars() .chars()
.next() .next()
.map(|c| c.is_digit(10)) .map(|c| c.is_ascii_digit())
.unwrap_or(false); .unwrap_or(false);
if is_digit { if is_digit {
format_ident!("TYPE_{}", new_variant_name) format_ident!("TYPE_{}", new_variant_name)