Skip to content
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

Any reason why receive_batch_multipart requires 'static for body? #544

Closed
XiNiHa opened this issue Jun 16, 2021 · 3 comments
Closed

Any reason why receive_batch_multipart requires 'static for body? #544

XiNiHa opened this issue Jun 16, 2021 · 3 comments
Labels
question Further information is requested

Comments

@XiNiHa
Copy link
Contributor

XiNiHa commented Jun 16, 2021

While updating the Rocket integration for 0.5.0-rc.1, I found that it is not possible to use async_graphql::http::receive_batch_body since it requires 'static lifetime for the data parameter and the recent Rocket version changed to require the lifetime of the body data to be the same with the lifetime of the request.

However, removing 'static requirement from both receive_batch_body and receive_batch_multipart simply fixed all the issues without any errors. Is there any specific reason that data parameter of receive_batch_multipart should be marked as 'static? Otherwise, I'll just make a pull request with the 'static requirement removed.

@XiNiHa XiNiHa added the question Further information is requested label Jun 16, 2021
@sunli829
Copy link
Collaborator

It seems that this 'static is unnecessary. 😁

@sunli829
Copy link
Collaborator

I tried to remove the 'static constraint on the body, and no problem was found.

sunli829 added a commit that referenced this issue Jun 16, 2021
@XiNiHa
Copy link
Contributor Author

XiNiHa commented Jun 16, 2021

Great, just created the pull request as mentioned above(#545)

@XiNiHa XiNiHa closed this as completed Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants