From f28ff4f1c1beb579dc9e892f4f9d7ee99685400a Mon Sep 17 00:00:00 2001 From: "Aode (lion)" Date: Sat, 5 Mar 2022 17:02:58 -0600 Subject: [PATCH] Oops --- src/lib.rs | 2 +- src/runtime.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 15d0223..5aefa71 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,6 +9,6 @@ pub mod task; pub use task::{spawn, spawn_blocking}; -pub fn block_on(future: impl std::future::Future + Send + 'static) -> T { +pub fn block_on(future: impl std::future::Future) -> T { runtime::Runtime::new().block_on(future) } diff --git a/src/runtime.rs b/src/runtime.rs index daf5fe3..6dca29c 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -179,7 +179,7 @@ impl Runtime { &self.runtime_handle } - pub fn block_on(&self, future: impl Future + Send + 'static) -> T { + pub fn block_on(&self, future: impl Future) -> T { self.handle().block_on(future) }