From 36025ef27d3b54cf1a1743ccedfa1afdcf10fab5 Mon Sep 17 00:00:00 2001 From: forks Date: Wed, 11 Dec 2024 15:12:20 +0800 Subject: [PATCH] impl Clone trait for TypedChildrenFn --- leptos/src/children.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/leptos/src/children.rs b/leptos/src/children.rs index 5f32e6fb92..956cc74645 100644 --- a/leptos/src/children.rs +++ b/leptos/src/children.rs @@ -285,6 +285,13 @@ impl Debug for TypedChildrenFn { } } +impl Clone for TypedChildrenFn { + // Manual implementation to avoid the `T: Clone` bound. + fn clone(&self) -> Self { + Self(self.0.clone()) + } +} + impl TypedChildrenFn { /// Extracts the inner `children` function. pub fn into_inner(self) -> Arc View + Send + Sync> {