Panics in const fn are now stable
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 378
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 5
Description
So we can replace
https://github.com/hyperium/http/blob/master/src/header/name.rs#L1258
([] as [u8; 0])[0]; // Invalid header name
with adequate
panic!("Invalid header name");
Or im missing something and it will not going work?
Contributor guide
No contributing guide indexed for this repository
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
Inspect src/header/name.rs at the referenced line and verify whether the current Rust version supports panic! in this const context. Confirm the replacement preserves the intended invalid-header failure, then run the repository’s existing checks to ensure the change builds and passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100