Documentation of headerMap should hint from_static for construct header value
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.3k
- Forks
- 1.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 14
Description
The documentation of HeaderMap specially the Exemples 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 using HeaderValue::from_static("example.com") that is much better. Or at least mention both until http release a version that require Rust 1.57 since const_panic are stable
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the HeaderMap documentation's Examples section on docs.rs and review the current header-value construction example. Update the documentation to recommend HeaderValue::from_static("example.com"), or mention it alongside the existing parse example, and confirm the rendered example reflects the chosen guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100