@@ -4,7 +4,7 @@ use std::str::FromStr;
44use std:: convert:: AsRef ;
55
66#[ cfg( feature = "compat" ) ]
7- use http_types ;
7+ use http ;
88
99use error:: Error ;
1010use self :: Method :: { Options , Get , Post , Put , Delete , Head , Trace , Connect , Patch ,
@@ -160,26 +160,26 @@ impl Default for Method {
160160}
161161
162162#[ cfg( feature = "compat" ) ]
163- impl From < http_types :: Method > for Method {
164- fn from ( method : http_types :: Method ) -> Method {
163+ impl From < http :: Method > for Method {
164+ fn from ( method : http :: Method ) -> Method {
165165 match method {
166- http_types :: Method :: GET =>
166+ http :: Method :: GET =>
167167 Method :: Get ,
168- http_types :: Method :: POST =>
168+ http :: Method :: POST =>
169169 Method :: Post ,
170- http_types :: Method :: PUT =>
170+ http :: Method :: PUT =>
171171 Method :: Put ,
172- http_types :: Method :: DELETE =>
172+ http :: Method :: DELETE =>
173173 Method :: Delete ,
174- http_types :: Method :: HEAD =>
174+ http :: Method :: HEAD =>
175175 Method :: Head ,
176- http_types :: Method :: OPTIONS =>
176+ http :: Method :: OPTIONS =>
177177 Method :: Options ,
178- http_types :: Method :: CONNECT =>
178+ http :: Method :: CONNECT =>
179179 Method :: Connect ,
180- http_types :: Method :: PATCH =>
180+ http :: Method :: PATCH =>
181181 Method :: Patch ,
182- http_types :: Method :: TRACE =>
182+ http :: Method :: TRACE =>
183183 Method :: Trace ,
184184 _ => {
185185 method. as_ref ( ) . parse ( )
@@ -190,29 +190,29 @@ impl From<http_types::Method> for Method {
190190}
191191
192192#[ cfg( feature = "compat" ) ]
193- impl From < Method > for http_types :: Method {
194- fn from ( method : Method ) -> http_types :: Method {
195- use http_types :: HttpTryFrom ;
193+ impl From < Method > for http :: Method {
194+ fn from ( method : Method ) -> http :: Method {
195+ use http :: HttpTryFrom ;
196196
197197 match method {
198198 Method :: Get =>
199- http_types :: Method :: GET ,
199+ http :: Method :: GET ,
200200 Method :: Post =>
201- http_types :: Method :: POST ,
201+ http :: Method :: POST ,
202202 Method :: Put =>
203- http_types :: Method :: PUT ,
203+ http :: Method :: PUT ,
204204 Method :: Delete =>
205- http_types :: Method :: DELETE ,
205+ http :: Method :: DELETE ,
206206 Method :: Head =>
207- http_types :: Method :: HEAD ,
207+ http :: Method :: HEAD ,
208208 Method :: Options =>
209- http_types :: Method :: OPTIONS ,
209+ http :: Method :: OPTIONS ,
210210 Method :: Connect =>
211- http_types :: Method :: CONNECT ,
211+ http :: Method :: CONNECT ,
212212 Method :: Patch =>
213- http_types :: Method :: PATCH ,
213+ http :: Method :: PATCH ,
214214 Method :: Trace =>
215- http_types :: Method :: TRACE ,
215+ http :: Method :: TRACE ,
216216 Method :: Extension ( s) => {
217217 HttpTryFrom :: try_from ( s. as_str ( ) )
218218 . expect ( "attempted to convert invalid method" )
@@ -279,7 +279,7 @@ mod tests {
279279 #[ test]
280280 #[ cfg( feature = "compat" ) ]
281281 fn test_compat ( ) {
282- use http_types :: { self , HttpTryFrom } ;
282+ use http :: { self , HttpTryFrom } ;
283283
284284 let methods = vec ! [
285285 "GET" ,
@@ -289,9 +289,9 @@ mod tests {
289289 ] ;
290290 for method in methods {
291291 let orig_hyper_method = Method :: from_str ( method) . unwrap ( ) ;
292- let orig_http_method = http_types :: Method :: try_from ( method) . unwrap ( ) ;
292+ let orig_http_method = http :: Method :: try_from ( method) . unwrap ( ) ;
293293 let conv_hyper_method: Method = orig_http_method. clone ( ) . into ( ) ;
294- let conv_http_method: http_types :: Method = orig_hyper_method. clone ( ) . into ( ) ;
294+ let conv_http_method: http :: Method = orig_hyper_method. clone ( ) . into ( ) ;
295295 assert_eq ! ( orig_hyper_method, conv_hyper_method) ;
296296 assert_eq ! ( orig_http_method, conv_http_method) ;
297297 }
0 commit comments