Remove 'static requirement from std::future::Future

This commit is contained in:
Igor Aleksanov 2020-09-20 10:46:15 +03:00
parent 6e78c3a467
commit 66a665826a
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ mod executor_impl {
pub fn block_on_local<F>(rt: &mut Runtime, local: &LocalSet, f: F) -> F::Output
where
F: std::future::Future + 'static,
F: std::future::Future,
{
local.block_on(rt, f)
}
@ -44,7 +44,7 @@ mod executor_impl {
pub fn block_on_local<F>(rt: &mut Runtime, local: &LocalSet, f: F) -> F::Output
where
F: std::future::Future + 'static,
F: std::future::Future,
{
rt.block_on_std(local.run_until(f))
}

View File

@ -186,7 +186,7 @@ impl System {
rest_operations: Fut,
) -> R
where
Fut: std::future::Future<Output = R> + 'static,
Fut: std::future::Future<Output = R>,
{
let actix_system_task = LocalSet::new();
let sys = System::run_in_tokio(name.into(), &actix_system_task);