fix: let `mount_to_body` accept `FnOnce` closures (closes #2115) (#2116)

This commit is contained in:
NKID00 2023-12-18 09:28:18 +08:00 committed by GitHub
parent 21f4c27cfb
commit 8122941c3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -926,7 +926,7 @@ pub enum MountKind<'a> {
/// Runs the provided closure and mounts the result to the `<body>`.
pub fn mount_to_body<F, N>(f: F)
where
F: Fn() -> N + 'static,
F: FnOnce() -> N + 'static,
N: IntoView,
{
#[cfg(all(feature = "web", feature = "ssr"))]