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

Consider making aws_lambda_events::encodings::Body::Text a Cow<'static, str> #951

Open
FalkWoldmann opened this issue Dec 27, 2024 · 1 comment

Comments

@FalkWoldmann
Copy link
Contributor

This would reduce the amount of allocations needed when the body content is known at compile time

@FalkWoldmann
Copy link
Contributor Author

After trying it out a bit, unfortunately this doesn't look like it's that easy to do since impl<'a> From<&'a str> for Body does not live long enough. We could implement something like from_static_string but that would be quite uneconomic

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

1 participant