From 8122941c3c890c5d6d954f323983a6ce7b29c5e4 Mon Sep 17 00:00:00 2001 From: NKID00 Date: Mon, 18 Dec 2023 09:28:18 +0800 Subject: [PATCH] fix: let `mount_to_body` accept `FnOnce` closures (closes #2115) (#2116) --- leptos_dom/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leptos_dom/src/lib.rs b/leptos_dom/src/lib.rs index d7461f2a93..b6721bd245 100644 --- a/leptos_dom/src/lib.rs +++ b/leptos_dom/src/lib.rs @@ -926,7 +926,7 @@ pub enum MountKind<'a> { /// Runs the provided closure and mounts the result to the ``. pub fn mount_to_body(f: F) where - F: Fn() -> N + 'static, + F: FnOnce() -> N + 'static, N: IntoView, { #[cfg(all(feature = "web", feature = "ssr"))]