mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Simplify extracting a reference from an Option<Root<T>>, per review comments.
This commit is contained in:
parent
5713867778
commit
9de42c8935
2 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
|||
use dom::bindings::codegen::Bindings::NodeListBinding;
|
||||
use dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{JS, MutNullableHeap, Root};
|
||||
use dom::bindings::js::{JS, MutNullableHeap, Root, RootedReference};
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::node::{ChildrenMutation, Node};
|
||||
use dom::window::Window;
|
||||
|
@ -103,7 +103,7 @@ impl ChildrenList {
|
|||
let last_visited = node.GetFirstChild();
|
||||
ChildrenList {
|
||||
node: JS::from_ref(node),
|
||||
last_visited: MutNullableHeap::new(last_visited.as_ref().map(Root::r)),
|
||||
last_visited: MutNullableHeap::new(last_visited.r()),
|
||||
last_index: Cell::new(0u32),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue