File tree Expand file tree Collapse file tree 1 file changed +0
-35
lines changed Expand file tree Collapse file tree 1 file changed +0
-35
lines changed Original file line number Diff line number Diff line change @@ -35,38 +35,3 @@ impl Header for XRequestId {
35
35
values. extend ( std:: iter:: once ( value) ) ;
36
36
}
37
37
}
38
-
39
- static X_REAL_IP : HeaderName = HeaderName :: from_static ( "x-real-ip" ) ;
40
-
41
- pub struct XRealIp ( String ) ;
42
-
43
- impl XRealIp {
44
- pub fn as_str ( & self ) -> & str {
45
- self . 0 . as_str ( )
46
- }
47
- }
48
-
49
- impl Header for XRealIp {
50
- fn name ( ) -> & ' static HeaderName {
51
- & X_REAL_IP
52
- }
53
-
54
- fn decode < ' i , I > ( values : & mut I ) -> Result < Self , Error >
55
- where
56
- I : Iterator < Item = & ' i HeaderValue > ,
57
- {
58
- values
59
- . next ( )
60
- . and_then ( |value| value. to_str ( ) . ok ( ) )
61
- . map ( |value| Self ( value. to_string ( ) ) )
62
- . ok_or_else ( Error :: invalid)
63
- }
64
-
65
- fn encode < E > ( & self , values : & mut E )
66
- where
67
- E : Extend < HeaderValue > ,
68
- {
69
- let value = HeaderValue :: from_str ( & self . 0 ) . unwrap ( ) ;
70
- values. extend ( std:: iter:: once ( value) ) ;
71
- }
72
- }
You can’t perform that action at this time.
0 commit comments