Mark HeaderValue::from_maybe_shared_unchecked() as safe. - #871
Conversation
This method was always safe.
|
Is there a very strong reason to? I know it doesn't follow the official guidelines, but I also don't think they are always right. |
|
|
|
We've been aware of the official meaning of |
|
@seanmonstar can I at least fix the documentation? It currently says: but there's no UB. I can keep the safety section an explain what the risk is. |
|
Another issue that the function rejects non-utf-8 sequences in debug mode, but not in release. That would make sense if the goal was actually to reject non-utf-8 sequences, but I can also fix that in a follow-up PR. |
This method was always safe.