fix tests
This commit is contained in:
1 parent
943c76b1da
commit
b8600d5144
2 files changed
+9
-3
No files matched your search
@@ -126,7 +126,13 @@ impl<'b> VirtualDom {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Make sure the roots get transferred over while we're here
|
// Make sure the roots get transferred over while we're here
|
||||||
*right_template.root_ids.borrow_mut() = left_template.root_ids.borrow().clone();
|
{
|
||||||
|
let mut right = right_template.root_ids.borrow_mut();
|
||||||
|
right.clear();
|
||||||
|
for &element in left_template.root_ids.borrow().iter() {
|
||||||
|
right.push(element);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let root_ids = right_template.root_ids.borrow();
|
let root_ids = right_template.root_ids.borrow();
|
||||||
|
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ fn create_random_dynamic_node(cx: &ScopeState, depth: usize) -> DynamicNode {
|
|||||||
node_paths: &[&[0]],
|
node_paths: &[&[0]],
|
||||||
attr_paths: &[],
|
attr_paths: &[],
|
||||||
}),
|
}),
|
||||||
root_ids: Default::default(),
|
root_ids: bumpalo::collections::Vec::new_in(cx.bump()).into(),
|
||||||
dynamic_nodes: cx.bump().alloc([cx.component(
|
dynamic_nodes: cx.bump().alloc([cx.component(
|
||||||
create_random_element,
|
create_random_element,
|
||||||
DepthProps { depth, root: false },
|
DepthProps { depth, root: false },
|
||||||
@@ -276,7 +276,7 @@ fn create_random_element(cx: Scope<DepthProps>) -> Element {
|
|||||||
key: None,
|
key: None,
|
||||||
parent: None,
|
parent: None,
|
||||||
template: Cell::new(template),
|
template: Cell::new(template),
|
||||||
root_ids: Default::default(),
|
root_ids: bumpalo::collections::Vec::new_in(cx.bump()).into(),
|
||||||
dynamic_nodes: {
|
dynamic_nodes: {
|
||||||
let dynamic_nodes: Vec<_> = dynamic_node_types
|
let dynamic_nodes: Vec<_> = dynamic_node_types
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
Reference in new issue
Block a user