mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
clippy: Fix single_match warnings (#31876)
This commit is contained in:
parent
d16f259e1d
commit
b71de92569
7 changed files with 115 additions and 133 deletions
|
@ -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.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue