File tree 1 file changed +1
-8
lines changed 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 1
1
//! HTTP status codes
2
2
use std:: fmt;
3
3
use std:: cmp:: Ordering ;
4
- use std:: hash:: { Hash , Hasher } ;
5
4
6
5
// shamelessly lifted from Teepee. I tried a few schemes, this really
7
6
// does seem like the best. Improved scheme to support arbitrary status codes.
@@ -29,7 +28,7 @@ use std::hash::{Hash, Hasher};
29
28
/// Registry](http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) which is
30
29
/// the source for this enum (with one exception, 418 I'm a teapot, which is
31
30
/// inexplicably not in the register).
32
- #[ derive( Debug ) ]
31
+ #[ derive( Debug , Hash ) ]
33
32
pub enum StatusCode {
34
33
/// 100 Continue
35
34
/// [[RFC7231, Section 6.2.1](https://tools.ietf.org/html/rfc7231#section-6.2.1)]
@@ -534,12 +533,6 @@ impl Ord for StatusCode {
534
533
}
535
534
}
536
535
537
- impl Hash for StatusCode {
538
- fn hash < H : Hasher > ( & self , state : & mut H ) {
539
- self . to_u16 ( ) . hash ( state) ;
540
- }
541
- }
542
-
543
536
/// The class of an HTTP `status-code`.
544
537
///
545
538
/// [RFC 7231, section 6 (Response Status Codes)](https://tools.ietf.org/html/rfc7231#section-6):
You can’t perform that action at this time.
0 commit comments