Remove is_empty check in Ident::is_numeric.

`Ident`s can no longer be empty, so the test always succeeds.
This commit is contained in:
Nicholas Nethercote
2025-05-22 13:31:19 +10:00
parent 85d2d843c3
commit c309065ece

View File

@@ -2823,7 +2823,7 @@ impl Ident {
/// Whether this would be the identifier for a tuple field like `self.0`, as
/// opposed to a named field like `self.thing`.
pub fn is_numeric(self) -> bool {
!self.name.is_empty() && self.as_str().bytes().all(|b| b.is_ascii_digit())
self.as_str().bytes().all(|b| b.is_ascii_digit())
}
}