diff options
author | Oluwatobi Sofela <60105594+oluwatobiss@users.noreply.github.com> | 2024-03-26 15:01:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-26 14:01:10 +0000 |
commit | b71de9256911e1e29006cf1c1a782bda5c4c8968 (patch) | |
tree | b8b6336477c5dfbe1e90fc336da4392f763822ad /components/script/dom/htmlobjectelement.rs | |
parent | d16f259e1d3c7b8c0c0f4692af41ba2e41085e23 (diff) | |
download | servo-b71de9256911e1e29006cf1c1a782bda5c4c8968.tar.gz servo-b71de9256911e1e29006cf1c1a782bda5c4c8968.zip |
clippy: Fix single_match warnings (#31876)
Diffstat (limited to 'components/script/dom/htmlobjectelement.rs')
-rwxr-xr-x | components/script/dom/htmlobjectelement.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs index 75d84484e40..007b4950b62 100755 --- a/components/script/dom/htmlobjectelement.rs +++ b/components/script/dom/htmlobjectelement.rs @@ -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. } } } |