clippy: Fix single_match warnings (#31876)

This commit is contained in:
Oluwatobi Sofela 2024-03-26 15:01:10 +01:00 committed by GitHub
parent d16f259e1d
commit b71de92569
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 115 additions and 133 deletions

View file

@ -74,17 +74,14 @@ impl<'a> ProcessDataURL for &'a HTMLObjectElement {
// Makes the local `data` member match the status of the `data` attribute and starts
/// prefetching the image. This method must be called after `data` is changed.
fn process_data_url(&self) {
let elem = self.upcast::<Element>();
let element = self.upcast::<Element>();
// TODO: support other values
match (
elem.get_attribute(&ns!(), &local_name!("type")),
elem.get_attribute(&ns!(), &local_name!("data")),
if let (None, Some(_uri)) = (
element.get_attribute(&ns!(), &local_name!("type")),
element.get_attribute(&ns!(), &local_name!("data")),
) {
(None, Some(_uri)) => {
// TODO(gw): Prefetch the image here.
},
_ => {},
// TODO(gw): Prefetch the image here.
}
}
}