clippy: Fix a variety of warnings in components/script/dom (#31894)

This commit is contained in:
Ekta Siwach 2024-03-29 20:13:10 +05:30 committed by GitHub
parent 4a68243f65
commit b0196ad373
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 45 additions and 43 deletions

View file

@ -197,7 +197,7 @@ pub unsafe fn get_array_index_from_id(_cx: *mut JSContext, id: HandleId) -> Opti
let first_char = char::decode_utf16(chars.iter().cloned())
.next()
.map_or('\0', |r| r.unwrap_or('\0'));
if first_char < 'a' || first_char > 'z' {
if !('a'..='z').contains(&first_char) {
return None;
}