Skip to content

Commit a5f642d

Browse files
authored
Remove sync from lambda-http handler (#289)
Sync was added to the lambda http handler preventing handlers that used non-sync traits.
1 parent 9bd45c1 commit a5f642d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lambda-http/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pub trait Handler: Sized {
100100
/// The type of Response this Handler will return
101101
type Response: IntoResponse;
102102
/// The type of Future this Handler will return
103-
type Fut: Future<Output = Result<Self::Response, Self::Error>> + Send + Sync + 'static;
103+
type Fut: Future<Output = Result<Self::Response, Self::Error>> + Send + 'static;
104104
/// Function used to execute handler behavior
105105
fn call(&self, event: Request, context: Context) -> Self::Fut;
106106
}
@@ -115,7 +115,7 @@ impl<F, R, Fut> Handler for F
115115
where
116116
F: Fn(Request, Context) -> Fut,
117117
R: IntoResponse,
118-
Fut: Future<Output = Result<R, Error>> + Send + Sync + 'static,
118+
Fut: Future<Output = Result<R, Error>> + Send + 'static,
119119
{
120120
type Response = R;
121121
type Error = Error;
@@ -128,7 +128,7 @@ where
128128
#[doc(hidden)]
129129
pub struct TransformResponse<R, E> {
130130
request_origin: RequestOrigin,
131-
fut: Pin<Box<dyn Future<Output = Result<R, E>> + Send + Sync>>,
131+
fut: Pin<Box<dyn Future<Output = Result<R, E>> + Send>>,
132132
}
133133

134134
impl<R, E> Future for TransformResponse<R, E>

0 commit comments

Comments
 (0)