Oh, nice, we can remove an allocation on RSX nodes for the render process.
This commit is contained in:
parent
4e822fa383
commit
f1cb5fea93
3 changed files with 3 additions and 3 deletions
|
|
@ -47,7 +47,7 @@ impl RSX {
|
|||
) -> RSX {
|
||||
RSX::VirtualNode(VirtualNode {
|
||||
tag: tag,
|
||||
create_component_fn: Arc::new(create_fn),
|
||||
create_component_fn: create_fn,
|
||||
instance: None,
|
||||
layout_node: None,
|
||||
props: props,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ pub struct VirtualNode {
|
|||
|
||||
/// `Component` instances are created on-demand, if the reconciler deems it be so. This
|
||||
/// is a closure that should return an instance of the correct type.
|
||||
pub create_component_fn: Arc<fn() -> Arc<RwLock<Component>>>,
|
||||
pub create_component_fn: fn() -> Arc<RwLock<Component>>,
|
||||
|
||||
/// A cached component instance, which is transferred between trees. Since `Component`
|
||||
/// instances are lazily created, this is an `Option`, and defaults to `None`.
|
||||
|
|
|
|||
Reference in a new issue