Clippy: Fixed clippy warnings in components/script/dom (#31801)

* fixed clippy warnings in htmlformelement.rs

* Fixed clippy warnings

* Fixed warnings related to matches!

* made changes to compile "test-tidy" successfully
This commit is contained in:
Aarya Khandelwal 2024-03-21 12:44:12 +05:30 committed by GitHub
parent 5c0199b568
commit da3288dd00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 108 additions and 111 deletions

View file

@ -97,10 +97,10 @@ impl VirtualMethods for HTMLHRElement {
}
fn parse_plain_attribute(&self, name: &LocalName, value: DOMString) -> AttrValue {
match name {
&local_name!("align") => AttrValue::from_dimension(value.into()),
&local_name!("color") => AttrValue::from_legacy_color(value.into()),
&local_name!("width") => AttrValue::from_dimension(value.into()),
match *name {
local_name!("align") => AttrValue::from_dimension(value.into()),
local_name!("color") => AttrValue::from_legacy_color(value.into()),
local_name!("width") => AttrValue::from_dimension(value.into()),
_ => self
.super_type()
.unwrap()