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

@ -90,8 +90,7 @@ pub enum XMLName {
/// for details.
pub fn xml_name_type(name: &str) -> XMLName {
fn is_valid_start(c: char) -> bool {
match c {
':' |
matches!(c, ':' |
'A'..='Z' |
'_' |
'a'..='z' |
@ -106,9 +105,7 @@ pub fn xml_name_type(name: &str) -> XMLName {
'\u{3001}'..='\u{D7FF}' |
'\u{F900}'..='\u{FDCF}' |
'\u{FDF0}'..='\u{FFFD}' |
'\u{10000}'..='\u{EFFFF}' => true,
_ => false,
}
'\u{10000}'..='\u{EFFFF}')
}
fn is_valid_continuation(c: char) -> bool {