Remove most RootedReference uses

We can replace all uses of RootedReference for Option<T> by Option::deref calls.
This commit is contained in:
Anthony Ramine 2019-03-10 13:20:07 +01:00
parent 7bdfad92a5
commit 5fe5e5d6de
34 changed files with 186 additions and 185 deletions

View file

@ -8,7 +8,7 @@ use crate::dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::{
use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use crate::dom::bindings::error::{ErrorResult, Fallible};
use crate::dom::bindings::inheritance::Castable;
use crate::dom::bindings::root::{DomRoot, LayoutDom, RootedReference};
use crate::dom::bindings::root::{DomRoot, LayoutDom};
use crate::dom::bindings::str::DOMString;
use crate::dom::document::Document;
use crate::dom::element::{Element, RawLayoutElementHelpers};
@ -58,7 +58,8 @@ impl HTMLTableSectionElement {
struct RowsFilter;
impl CollectionFilter for RowsFilter {
fn filter(&self, elem: &Element, root: &Node) -> bool {
elem.is::<HTMLTableRowElement>() && elem.upcast::<Node>().GetParentNode().r() == Some(root)
elem.is::<HTMLTableRowElement>() &&
elem.upcast::<Node>().GetParentNode().deref() == Some(root)
}
}