fix some lints in use on destroy

This commit is contained in:
Evan Almloff committed 2024-01-19 12:14:06 -06:00
1 parent 439bc4e9e6
commit 3dce650367
1 file changed
+1 -1
+1 -1
View File
@@ -105,7 +105,7 @@ pub fn use_hook_with_cleanup<T: Clone + 'static>(
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