Remove Send + 'static from all block_ons

This commit is contained in:
Aode (lion) 2022-03-05 17:01:51 -06:00
parent 2f02b8f901
commit 2e2a5f18e1
2 changed files with 2 additions and 7 deletions

View file

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

View file

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