From 66a665826a9557824d5ec45e27ddad6f37cd6b2f Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Sun, 20 Sep 2020 10:46:15 +0300 Subject: [PATCH] Remove 'static requirement from std::future::Future --- actix-rt/src/executor.rs | 4 ++-- actix-rt/src/system.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actix-rt/src/executor.rs b/actix-rt/src/executor.rs index 56b96fb7..71ca7a07 100644 --- a/actix-rt/src/executor.rs +++ b/actix-rt/src/executor.rs @@ -24,7 +24,7 @@ mod executor_impl { pub fn block_on_local(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(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)) } diff --git a/actix-rt/src/system.rs b/actix-rt/src/system.rs index b2fc3834..c6e82316 100644 --- a/actix-rt/src/system.rs +++ b/actix-rt/src/system.rs @@ -186,7 +186,7 @@ impl System { rest_operations: Fut, ) -> R where - Fut: std::future::Future + 'static, + Fut: std::future::Future, { let actix_system_task = LocalSet::new(); let sys = System::run_in_tokio(name.into(), &actix_system_task);