Clippy: Fixed some clippy warnings (#31818)

* Fixed clippy warnings

* made changes for lowercase characters.

* changed is_lowercase() to is_ascii_lowercase()

* added std library function `is_ascii_uppercase()` and `is_ascii_lowercase()`

* made recommended changes
This commit is contained in:
Aarya Khandelwal 2024-03-23 18:18:49 +05:30 committed by GitHub
parent 3c05b58221
commit 566fd475d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 57 additions and 68 deletions

View file

@ -158,8 +158,8 @@ impl VirtualMethods for HTMLFieldSetElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
match attr.local_name() {
&local_name!("disabled") => {
match *attr.local_name() {
local_name!("disabled") => {
let disabled_state = match mutation {
AttributeMutation::Set(None) => true,
AttributeMutation::Set(Some(_)) => {
@ -219,7 +219,7 @@ impl VirtualMethods for HTMLFieldSetElement {
}
el.update_sequentially_focusable_status();
},
&local_name!("form") => {
local_name!("form") => {
self.form_attribute_mutated(mutation);
},
_ => {},
@ -236,7 +236,7 @@ impl FormControl for HTMLFieldSetElement {
self.form_owner.set(form);
}
fn to_element<'a>(&'a self) -> &'a Element {
fn to_element(&self) -> &Element {
self.upcast::<Element>()
}
}