Simplify extracting a reference from an Option<Root<T>>, per review comments.

This commit is contained in:
Eli Friedman 2015-10-15 12:41:13 -07:00
parent 5713867778
commit 9de42c8935
2 changed files with 3 additions and 3 deletions

View file

@ -297,7 +297,7 @@ impl Document {
.filter_map(HTMLBaseElementCast::to_root)
.filter(|element| ElementCast::from_ref(&**element).has_attribute(&atom!("href")))
.next();
self.base_element.set(base.as_ref().map(Root::r));
self.base_element.set(base.r());
}
pub fn quirks_mode(&self) -> QuirksMode {