diff --git a/src/utils.rs b/src/utils.rs index c5965bd2f..62cf07d9e 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -37,9 +37,9 @@ pub(crate) fn get_tokio_runtime(py: Python) -> PyRef { } /// Utility to collect rust futures with GIL released -pub fn wait_for_future(py: Python, f: F) -> F::Output +pub fn wait_for_future(py: Python, f: F) -> F::Output where - F: Send, + F: Future + Send, F::Output: Send, { let runtime: &Runtime = &get_tokio_runtime(py).0;