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);