diff options
author | Ekta Siwach <137225906+ektuu@users.noreply.github.com> | 2024-03-29 20:13:10 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-29 14:43:10 +0000 |
commit | b0196ad3734149c98cfad89df0864fca3bdf92ce (patch) | |
tree | 36d0aa69709b7e6fdaf055b50c8eac386891b17b /components/script/dom/bindings/xmlname.rs | |
parent | 4a68243f65c4fc32a4d12faa21d9c36e02a05f52 (diff) | |
download | servo-b0196ad3734149c98cfad89df0864fca3bdf92ce.tar.gz servo-b0196ad3734149c98cfad89df0864fca3bdf92ce.zip |
clippy: Fix a variety of warnings in components/script/dom (#31894)
Diffstat (limited to 'components/script/dom/bindings/xmlname.rs')
-rw-r--r-- | components/script/dom/bindings/xmlname.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/components/script/dom/bindings/xmlname.rs b/components/script/dom/bindings/xmlname.rs index 7fd7a7ec4de..aac839f53fd 100644 --- a/components/script/dom/bindings/xmlname.rs +++ b/components/script/dom/bindings/xmlname.rs @@ -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 { |