use_future works

This commit is contained in:
Jonathan Kelley committed 2024-01-31 16:56:58 -08:00
1 parent 6818bbe10a
commit 44966efde2
5 files changed
+76 -42

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ use std::future::Future;
/// will be canceled before the new one is started.
///
/// - dependencies: a tuple of references to values that are PartialEq + Clone
pub fn use_resource<T, F>(future: impl Fn() -> F) -> UseResource<T>
pub fn use_resource<T, F>(future: impl Fn() -> F + 'static) -> UseResource<T>
where
T: 'static,
F: Future<Output = T> + 'static,