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

use HeaderName::from_static in Send::check_headers #675

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

srijs
Copy link

@srijs srijs commented Apr 16, 2023

Prevents parsing the header names (due to the AsHeaderName impl on &str) over and over again at runtime. It's just a small optimization in my case (sub-1% cpu time) but given the simplicity of the change seemed worth making in any case.

Copy link
Collaborator

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@srijs
Copy link
Author

srijs commented Apr 16, 2023

@hawkw thanks for the quick approve! I updated the branch based on the failed build, but looks like this needs another approval to re-run the tests?

@hawkw
Copy link
Collaborator

hawkw commented Apr 16, 2023

re-approved, hopefully everything passes this time!

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

Successfully merging this pull request may close these issues.

None yet

2 participants