more clippy::style fixes:

get_first
single_char_add_str
unnecessary_mut_passed
manual_map
manual_is_ascii_check
This commit is contained in:
Matthias Krüger 2023-07-23 13:11:20 +02:00
parent ed4c5fef72
commit af2b370100
8 changed files with 12 additions and 20 deletions

View file

@ -3013,8 +3013,7 @@ pub struct FieldDef<'hir> {
impl FieldDef<'_> {
// Still necessary in couple of places
pub fn is_positional(&self) -> bool {
let first = self.ident.as_str().as_bytes()[0];
(b'0'..=b'9').contains(&first)
self.ident.as_str().as_bytes()[0].is_ascii_digit()
}
}