diff --git a/crates/napi/src/tokio_runtime.rs b/crates/napi/src/tokio_runtime.rs index f7728b39..3074ba70 100644 --- a/crates/napi/src/tokio_runtime.rs +++ b/crates/napi/src/tokio_runtime.rs @@ -65,10 +65,7 @@ where /// Runs a future to completion /// This is blocking, meaning that it pauses other execution until the future is complete, /// only use it when it is absolutely necessary, in other places use async functions instead. -pub fn block_on(fut: F) -> F::Output -where - F: 'static + Send + Future, -{ +pub fn block_on(fut: F) -> F::Output { RT.read().unwrap().as_ref().unwrap().block_on(fut) }