We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cbae4e commit e332270Copy full SHA for e332270
crates/napi/src/tokio_runtime.rs
@@ -65,10 +65,7 @@ where
65
/// Runs a future to completion
66
/// This is blocking, meaning that it pauses other execution until the future is complete,
67
/// only use it when it is absolutely necessary, in other places use async functions instead.
68
-pub fn block_on<F, O>(fut: F) -> F::Output
69
-where
70
- F: 'static + Send + Future<Output = O>,
71
-{
+pub fn block_on<F: Future>(fut: F) -> F::Output {
72
RT.read().unwrap().as_ref().unwrap().block_on(fut)
73
}
74
0 commit comments