mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 12:43:08 +00:00
remove an extra clone
This commit is contained in:
parent
f1b2f964c0
commit
d8e79b656b
2 changed files with 4 additions and 4 deletions
|
@ -37,7 +37,7 @@ impl VirtualDom {
|
|||
&mut self,
|
||||
to: &mut impl WriteMutations,
|
||||
scope: ScopeId,
|
||||
new_node: &RenderReturn,
|
||||
new_node: RenderReturn,
|
||||
parent: Option<ElementRef>,
|
||||
) -> usize {
|
||||
self.runtime.scope_stack.borrow_mut().push(scope);
|
||||
|
@ -46,7 +46,7 @@ impl VirtualDom {
|
|||
let nodes = new_node.create(self, to, parent);
|
||||
|
||||
// Then set the new node as the last rendered node
|
||||
self.scopes[scope.0].last_rendered_node = Some(new_node.clone());
|
||||
self.scopes[scope.0].last_rendered_node = Some(new_node);
|
||||
|
||||
self.runtime.scope_stack.borrow_mut().pop();
|
||||
nodes
|
||||
|
@ -140,6 +140,6 @@ impl VNode {
|
|||
|
||||
let new = dom.run_scope(scope);
|
||||
|
||||
dom.create_scope(to, scope, &new, parent)
|
||||
dom.create_scope(to, scope, new, parent)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -558,7 +558,7 @@ impl VirtualDom {
|
|||
let new_nodes = self.run_scope(ScopeId::ROOT);
|
||||
|
||||
// Rebuilding implies we append the created elements to the root
|
||||
let m = self.create_scope(to, ScopeId::ROOT, &new_nodes, None);
|
||||
let m = self.create_scope(to, ScopeId::ROOT, new_nodes, None);
|
||||
|
||||
to.append_children(ElementId(0), m);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue