fix some lints in use on destroy
This commit is contained in:
1 parent
439bc4e9e6
commit
3dce650367
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user