Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StatusCode::EARLY_HINTS and TOO_EARLY constants #453

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dekellum
Copy link
Contributor

The StatusCode docs imply full coverage of IANA status codes and these two were added after the original implementation.

Its a highly safe change, but I'd wait for 1.0.0, treating it more like a new feature.

Closes #439

@c410-f3r
Copy link

c410-f3r commented Dec 5, 2021

@seanmonstar This PR is very trivial and shouldn't take much time to review

Copy link

@robjtede robjtede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think being on the IANA list is a good enough candidacy requirement despite these being "experimental" RFCs.

Comment on lines -19 to +40
fn equates_with_u16() {
fn partial_eq_ne() {
let status = StatusCode::from_u16(200u16).unwrap();
assert_eq!(200u16, status);
assert_eq!(status, 200u16);
assert_ne!(status, 201u16);
assert_ne!(status, 0u16);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything in this file strikes me as detritus from #451.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StatusCode doesn't have TOO_EARLY and EARLY_HINTS variants
3 participants