From 2276bee5ecc00d38af947eb81015f520c0f835fe Mon Sep 17 00:00:00 2001 From: Blake Hildebrand Date: Sat, 13 Feb 2021 11:21:26 -0800 Subject: [PATCH] Remove sync from lambda-http handler Sync was added to the lambda http handler preventing handlers that used non-sync traits. --- lambda-http/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lambda-http/src/lib.rs b/lambda-http/src/lib.rs index 91c8cd0d..7cff2b9a 100644 --- a/lambda-http/src/lib.rs +++ b/lambda-http/src/lib.rs @@ -100,7 +100,7 @@ pub trait Handler: Sized { /// The type of Response this Handler will return type Response: IntoResponse; /// The type of Future this Handler will return - type Fut: Future> + Send + Sync + 'static; + type Fut: Future> + Send + 'static; /// Function used to execute handler behavior fn call(&self, event: Request, context: Context) -> Self::Fut; } @@ -115,7 +115,7 @@ impl Handler for F where F: Fn(Request, Context) -> Fut, R: IntoResponse, - Fut: Future> + Send + Sync + 'static, + Fut: Future> + Send + 'static, { type Response = R; type Error = Error; @@ -128,7 +128,7 @@ where #[doc(hidden)] pub struct TransformResponse { request_origin: RequestOrigin, - fut: Pin> + Send + Sync>>, + fut: Pin> + Send>>, } impl Future for TransformResponse