-
Notifications
You must be signed in to change notification settings - Fork 291
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 Method::from_static #595
base: master
Are you sure you want to change the base?
Conversation
5dc2a6b
to
d9a6f0b
Compare
b2fa38f
to
7107737
Compare
Oh, I just realised that CI failed due to |
We could probably update the MSRV, depending on what the version required is and how old it is. |
Rust 1.57.0, from 2021-12-02 |
For tokio, the current MSRV is 1.56.0. |
7107737
to
7232c97
Compare
I've updated the PR to panic without We can remove this hack (both this new instance and existing ones) once the MSRV is bumped to 1.57.0 or greater. |
7232c97
to
755c3b4
Compare
I was wondering if we could add a variant |
I don't know of any methods that are longer than 15 bytes, so I'm not sure that it's worth the effort. |
What's this stuck on? |
Allows creating constant `Method` instances, e.g.: const PROPFIND: Method = Method::from_static(b"PROPFIND"); Fixes: hyperium#587
755c3b4
to
b275280
Compare
I would also like to see this being merged as it helps with implementing a webdav server base on hyper
recently I stubbled over the
figured out that this wouldn't work with the current implementation since the equality also checks the enum variant wich is required that |
Allows creating constant
Method
instances, e.g.:Fixes: #587