Skip to content

Does lambda_http::Handler::Future requires Send ? #342

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

Closed
fmonniot opened this issue Sep 7, 2021 · 3 comments
Closed

Does lambda_http::Handler::Future requires Send ? #342

fmonniot opened this issue Sep 7, 2021 · 3 comments

Comments

@fmonniot
Copy link
Contributor

fmonniot commented Sep 7, 2021

Hello there,

The current implementation of lambda_http's Handler::Fut requires a Send bound, but the underlying lambda_runtime's Handler::Fut does not. Is there a reason why this bound is present? Future-proofing the API or remnant of the past perhaps? The crate still compiles (and the tests pass) after removing the bound.

Would the team be interesting in a PR with this commit.

This open up some interesting avenue too. For example, I found this issue while trying to integrate actix on top of the lambda_http crate (swaping out HttpServer with lambda_runtime::run(lambda_http::handler basically).

Thanks !

@coltonweaver
Copy link
Contributor

Hi @fmonniot, thanks for pointing this out! This is indeed unintentional. I missed this change whenever I made the changes to remove the 'static bounds from lambda_http to match the runtime. If you want to go ahead and publish your linked commit as a PR, I would happily review it.

@fmonniot
Copy link
Contributor Author

fmonniot commented Sep 8, 2021

No worry and thanks for the prompt response. I opened #344 with the change.

@coltonweaver
Copy link
Contributor

Just approved and merged your code in. Thanks for making this change! Feel free to reopen this issue if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants