mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Split TCast::to into TCast::to_unchecked and TCast::to.
This commit is contained in:
parent
19a7c429a1
commit
0fccf5e386
10 changed files with 71 additions and 64 deletions
|
@ -39,7 +39,7 @@ impl HTMLCollection {
|
|||
let mut elements = ~[];
|
||||
for child in root.traverse_preorder() {
|
||||
if child.is_element() {
|
||||
let elem: JS<Element> = ElementCast::to(&child);
|
||||
let elem: JS<Element> = ElementCast::to(&child).unwrap();
|
||||
if predicate(&elem) {
|
||||
elements.push(elem);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue