From 27b664b1eb1a6b9a6d4e639435a5e57babd2876c Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Fri, 13 Jan 2023 13:20:02 +0200 Subject: [PATCH] fix: remove conditional send for TestEnv Signed-off-by: Lachezar Lechev --- src/unit_tests/env.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/unit_tests/env.rs b/src/unit_tests/env.rs index 74ff7e6e6..81f8b64cc 100644 --- a/src/unit_tests/env.rs +++ b/src/unit_tests/env.rs @@ -1,8 +1,6 @@ use crate::models::ctx::Ctx; use crate::models::streaming_server::StreamingServer; -use crate::runtime::{ - ConditionalSend, Env, EnvFuture, EnvFutureExt, Model, Runtime, RuntimeEvent, TryEnvFuture, -}; +use crate::runtime::{Env, EnvFuture, EnvFutureExt, Model, Runtime, RuntimeEvent, TryEnvFuture}; use chrono::{DateTime, Utc}; use enclose::enclose; use futures::channel::mpsc::Receiver; @@ -106,10 +104,7 @@ impl TestEnv { } impl Env for TestEnv { - fn fetch< - IN: Serialize + ConditionalSend + 'static, - OUT: for<'de> Deserialize<'de> + ConditionalSend + 'static, - >( + fn fetch Deserialize<'de> + 'static>( request: http::Request, ) -> TryEnvFuture { let request = Request::from(request); @@ -122,9 +117,7 @@ impl Env for TestEnv { }) .boxed_env() } - fn get_storage Deserialize<'de> + ConditionalSend + 'static>( - key: &str, - ) -> TryEnvFuture> { + fn get_storage Deserialize<'de> + 'static>(key: &str) -> TryEnvFuture> { future::ok( STORAGE .read() @@ -142,10 +135,10 @@ impl Env for TestEnv { }; future::ok(()).boxed_env() } - fn exec_concurrent + ConditionalSend + 'static>(future: F) { + fn exec_concurrent + 'static>(future: F) { tokio_current_thread::spawn(future); } - fn exec_sequential + ConditionalSend + 'static>(future: F) { + fn exec_sequential + 'static>(future: F) { tokio_current_thread::spawn(future); } fn now() -> DateTime {