Lazy Component generators have no need for capture semantics, so... we can make these simpler, behind the scenes.

This commit is contained in:
Ryan McGrath 2019-05-25 03:07:56 -07:00
parent 732f88dec0
commit 4e822fa383
No known key found for this signature in database
GPG key ID: 811674B62B666830
2 changed files with 6 additions and 2 deletions

View file

@ -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>> + Send + Sync + 'static>,
pub create_component_fn: Arc<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`.