try not double boxing

This commit is contained in:
Evan Almloff committed 2024-01-17 15:07:45 -06:00
1 parent 0c532c5e0c
commit dab87c0144
11 files changed
+166 -103

No files matched your search

+1 -3
View File
@@ -520,7 +520,7 @@ pub struct VComponent {
impl VComponent {
/// Create a new [`VComponent`] variant
pub fn new<P, M>(
pub fn new<P, M: 'static>(
component: impl ComponentFunction<P, M>,
props: P,
fn_name: &'static str,
@@ -528,9 +528,7 @@ impl VComponent {
where
P: Properties + 'static,
{
let component = Rc::new(component);
let render_fn = component.id();
let component = component.as_component();
let props = new_any_props(component, <P as Properties>::memoize, props, fn_name);
VComponent {