Open Stargateur opened 2 years ago
Or at least mention both until http release a version that require Rust 1.57 since
const_panic
are stable
FWIW from_static
doesn't depend on const_panic
https://docs.rs/http/latest/src/http/header/value.rs.html#87
I was guessing the reason it was not the case it's because the error message is confusing, const_panic should allow a more clear message.
The documentation of
HeaderMap
specially theExemples
section advice to do"example.com".parse().unwrap()
, following https://github.com/hyperium/hyper/issues/2713 I suggest the doc should replace the.parse().unwrap()
by usingHeaderValue::from_static("example.com")
that is much better. Or at least mention both until http release a version that require Rust 1.57 sinceconst_panic
are stable