Open nazar-pc opened 2 months ago
Funnily enough, FromStr
checks for new lines in HeaderValue
and From<&str>
doesn't. Is that a bug?
Funnily enough,
FromStr
checks for new lines inHeaderValue
andFrom<&str>
doesn't. Is that a bug?
🤷♂️ https://github.com/nats-io/nats-architecture-and-design/issues/236
Hey!
I will have a run over those validation next week to make them consistent and not affecting perf.
HeaderValue
from String
is ok to add.
Proposed change
If there is already allocated
String
with valid contents, it should be possible to createHeaderValue
without unnecessary re-allocation going through&str
.Use case
To improve efficiency
Contribution
No response