From f1cb5fea9394aecc92bb176b29ec413a9a2ebfcf Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Sat, 25 May 2019 03:14:48 -0700 Subject: [PATCH] Oh, nice, we can remove an allocation on RSX nodes for the render process. --- lifecycle/src/rsx/mod.rs | 2 +- lifecycle/src/rsx/virtual_node.rs | 2 +- rust-toolchain | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lifecycle/src/rsx/mod.rs b/lifecycle/src/rsx/mod.rs index f55299a..4d2fa9e 100644 --- a/lifecycle/src/rsx/mod.rs +++ b/lifecycle/src/rsx/mod.rs @@ -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, diff --git a/lifecycle/src/rsx/virtual_node.rs b/lifecycle/src/rsx/virtual_node.rs index b45ff05..e8f3be0 100644 --- a/lifecycle/src/rsx/virtual_node.rs +++ b/lifecycle/src/rsx/virtual_node.rs @@ -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 Arc>>, + pub create_component_fn: fn() -> Arc>, /// A cached component instance, which is transferred between trees. Since `Component` /// instances are lazily created, this is an `Option`, and defaults to `None`. diff --git a/rust-toolchain b/rust-toolchain index 00e952d..2aeaa11 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.34.2 +1.35.0