Skip to content

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

New issue

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

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

Already on GitHub? # to your account

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!

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

Successfully merging this pull request may close these issues.

2 participants