hyperium / hyperium/http

Panics in const fn are now stable

Open
#564 4 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.