From 3dce650367db93f604c75083789f38900cb4865f Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Fri, 19 Jan 2024 12:14:06 -0600 Subject: [PATCH] fix some lints in use on destroy --- packages/hooks/src/use_on_destroy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hooks/src/use_on_destroy.rs b/packages/hooks/src/use_on_destroy.rs index 26c85b823..c38b1fd7d 100644 --- a/packages/hooks/src/use_on_destroy.rs +++ b/packages/hooks/src/use_on_destroy.rs @@ -105,7 +105,7 @@ pub fn use_hook_with_cleanup( hook: impl FnOnce() -> T, cleanup: impl FnOnce(T) + 'static, ) -> T { - let value = use_hook(|| hook()); + let value = use_hook(hook); let _value = value.clone(); use_on_destroy(move || cleanup(_value)); value