Skip to content

Commit

Permalink
script: Use ? on option more often.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Dec 9, 2017
1 parent dbf0183 commit 339d633
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions components/script/dom/htmllegendelement.rs
Expand Up @@ -75,10 +75,7 @@ impl VirtualMethods for HTMLLegendElement {
impl HTMLLegendElementMethods for HTMLLegendElement {
// https://html.spec.whatwg.org/multipage/#dom-legend-form
fn GetForm(&self) -> Option<DomRoot<HTMLFormElement>> {
let parent = match self.upcast::<Node>().GetParentElement() {
Some(parent) => parent,
None => return None,
};
let parent = self.upcast::<Node>().GetParentElement()?;
if parent.is::<HTMLFieldSetElement>() {
return self.form_owner();
}
Expand Down

0 comments on commit 339d633

Please sign in to comment.