Skip to content

Remove Send bound in http's Handler #344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lambda-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub trait Handler<'a>: Sized {
/// The type of Response this Handler will return
type Response: IntoResponse;
/// The type of Future this Handler will return
type Fut: Future<Output = Result<Self::Response, Self::Error>> + Send + 'a;
type Fut: Future<Output = Result<Self::Response, Self::Error>> + 'a;
/// Function used to execute handler behavior
fn call(&self, event: Request, context: Context) -> Self::Fut;
}
Expand All @@ -112,7 +112,7 @@ impl<'a, F, R, Fut> Handler<'a> for F
where
F: Fn(Request, Context) -> Fut,
R: IntoResponse,
Fut: Future<Output = Result<R, Error>> + Send + 'a,
Fut: Future<Output = Result<R, Error>> + 'a,
{
type Response = R;
type Error = Error;
Expand All @@ -125,7 +125,7 @@ where
#[doc(hidden)]
pub struct TransformResponse<'a, R, E> {
request_origin: RequestOrigin,
fut: Pin<Box<dyn Future<Output = Result<R, E>> + Send + 'a>>,
fut: Pin<Box<dyn Future<Output = Result<R, E>> + 'a>>,
}

impl<'a, R, E> Future for TransformResponse<'a, R, E>
Expand Down