This commit is contained in:
Aode (lion) 2022-03-05 17:02:58 -06:00
parent 2e2a5f18e1
commit f28ff4f1c1
2 changed files with 2 additions and 2 deletions

View file

@ -9,6 +9,6 @@ pub mod task;
pub use task::{spawn, spawn_blocking};
pub fn block_on<T>(future: impl std::future::Future<Output = T> + Send + 'static) -> T {
pub fn block_on<T>(future: impl std::future::Future<Output = T>) -> T {
runtime::Runtime::new().block_on(future)
}

View file

@ -179,7 +179,7 @@ impl Runtime {
&self.runtime_handle
}
pub fn block_on<T>(&self, future: impl Future<Output = T> + Send + 'static) -> T {
pub fn block_on<T>(&self, future: impl Future<Output = T>) -> T {
self.handle().block_on(future)
}