mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Convert a method from &JSRef to JSRef
This also removes the unnecessary formation of a trait object.
This commit is contained in:
parent
698b916c09
commit
3953456b61
2 changed files with 4 additions and 5 deletions
|
@ -2086,8 +2086,7 @@ impl<'a> style::TNode<'a, JSRef<'a, Element>> for JSRef<'a, Node> {
|
|||
fn is_html_element_in_html_document(&self) -> bool {
|
||||
let elem: Option<JSRef<'a, Element>> = ElementCast::to_ref(*self);
|
||||
assert!(elem.is_some());
|
||||
let elem: &ElementHelpers = &elem.unwrap() as &ElementHelpers;
|
||||
elem.html_element_in_html_document()
|
||||
elem.unwrap().html_element_in_html_document()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue