h2 icon indicating copy to clipboard operation
h2 copied to clipboard

use HeaderName::from_static in Send::check_headers

Open srijs opened this issue 2 years ago • 2 comments

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.

srijs avatar Apr 16 '23 15:04 srijs

@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?

srijs avatar Apr 16 '23 17:04 srijs

re-approved, hopefully everything passes this time!

hawkw avatar Apr 16 '23 17:04 hawkw