mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 06:30:20 +00:00
fix some lints in use on destroy
This commit is contained in:
parent
439bc4e9e6
commit
3dce650367
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ pub fn use_hook_with_cleanup<T: Clone + 'static>(
|
||||||
hook: impl FnOnce() -> T,
|
hook: impl FnOnce() -> T,
|
||||||
cleanup: impl FnOnce(T) + 'static,
|
cleanup: impl FnOnce(T) + 'static,
|
||||||
) -> T {
|
) -> T {
|
||||||
let value = use_hook(|| hook());
|
let value = use_hook(hook);
|
||||||
let _value = value.clone();
|
let _value = value.clone();
|
||||||
use_on_destroy(move || cleanup(_value));
|
use_on_destroy(move || cleanup(_value));
|
||||||
value
|
value
|
||||||
|
|
Loading…
Reference in a new issue