mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Cleanup Node::as_element.
This commit is contained in:
parent
ba5a08c106
commit
c009bdec4e
1 changed files with 1 additions and 3 deletions
|
@ -2261,9 +2261,7 @@ impl<'a> style::TNode<'a, JSRef<'a, Element>> for JSRef<'a, Node> {
|
|||
}
|
||||
|
||||
fn as_element(self) -> JSRef<'a, Element> {
|
||||
let elem: Option<JSRef<'a, Element>> = ElementCast::to_ref(self);
|
||||
assert!(elem.is_some());
|
||||
elem.unwrap()
|
||||
ElementCast::to_ref(self).unwrap()
|
||||
}
|
||||
|
||||
fn match_attr(self, attr: &style::AttrSelector, test: |&str| -> bool) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue