Fix generational box in release mode

This commit is contained in:
Jonathan Kelley committed 2024-01-21 12:46:19 -08:00
1 parent 06d9b575b7
commit 028f499bf6
10 files changed
+182 -34

No files matched your search

-4
View File
@@ -15,11 +15,7 @@ use std::{any::Any, cell::Cell, future::Future, pin::Pin, rc::Rc, sync::Arc, tas
/// This is commonly used for components that cannot be rendered until some
/// asynchronous operation has completed.
///
/// Whenever the hooks dependencies change, the future will be re-evaluated.
/// If a future is pending when the dependencies change, the previous future
/// will be canceled before the new one is started.
///
/// - dependencies: a tuple of references to values that are PartialEq + Clone
pub fn use_future<T, F>(mut future: impl FnMut() -> F) -> UseFuture<T>
where
T: 'static,