@@ -39,21 +39,21 @@ pub enum SendError {
3939}
4040
4141#[ cfg( feature = "http" ) ]
42- impl < B > TryFrom < http_types :: Request < B > > for Request
42+ impl < B > TryFrom < hyperium :: Request < B > > for Request
4343where
4444 B : TryIntoBody ,
4545 B :: Error : std:: error:: Error + Send + Sync + ' static ,
4646{
4747 type Error = anyhow:: Error ;
48- fn try_from ( req : http_types :: Request < B > ) -> Result < Self , Self :: Error > {
48+ fn try_from ( req : hyperium :: Request < B > ) -> Result < Self , Self :: Error > {
4949 let method = match req. method ( ) {
50- & http_types :: Method :: GET => Method :: Get ,
51- & http_types :: Method :: POST => Method :: Post ,
52- & http_types :: Method :: PUT => Method :: Put ,
53- & http_types :: Method :: DELETE => Method :: Delete ,
54- & http_types :: Method :: PATCH => Method :: Patch ,
55- & http_types :: Method :: HEAD => Method :: Head ,
56- & http_types :: Method :: OPTIONS => Method :: Options ,
50+ & hyperium :: Method :: GET => Method :: Get ,
51+ & hyperium :: Method :: POST => Method :: Post ,
52+ & hyperium :: Method :: PUT => Method :: Put ,
53+ & hyperium :: Method :: DELETE => Method :: Delete ,
54+ & hyperium :: Method :: PATCH => Method :: Patch ,
55+ & hyperium :: Method :: HEAD => Method :: Head ,
56+ & hyperium :: Method :: OPTIONS => Method :: Options ,
5757 m => anyhow:: bail!( "Unsupported method: {m}" ) ,
5858 } ;
5959 let headers = req
@@ -197,12 +197,10 @@ impl Display for NonUtf8BodyError {
197197}
198198
199199#[ cfg( feature = "http" ) ]
200- impl < B : TryFromBody > TryNonRequestFromRequest for http_types :: Request < B > {
200+ impl < B : TryFromBody > TryNonRequestFromRequest for hyperium :: Request < B > {
201201 type Error = B :: Error ;
202202 fn try_from_request ( req : Request ) -> Result < Self , Self :: Error > {
203- let mut builder = http_types:: Request :: builder ( )
204- . uri ( req. uri )
205- . method ( req. method ) ;
203+ let mut builder = hyperium:: Request :: builder ( ) . uri ( req. uri ) . method ( req. method ) ;
206204 for ( n, v) in req. headers {
207205 builder = builder. header ( n, v) ;
208206 }
@@ -211,25 +209,25 @@ impl<B: TryFromBody> TryNonRequestFromRequest for http_types::Request<B> {
211209}
212210
213211#[ cfg( feature = "http" ) ]
214- impl From < Method > for http_types :: Method {
212+ impl From < Method > for hyperium :: Method {
215213 fn from ( method : Method ) -> Self {
216214 match method {
217- Method :: Get => http_types :: Method :: GET ,
218- Method :: Post => http_types :: Method :: POST ,
219- Method :: Put => http_types :: Method :: PUT ,
220- Method :: Delete => http_types :: Method :: DELETE ,
221- Method :: Patch => http_types :: Method :: PATCH ,
222- Method :: Head => http_types :: Method :: HEAD ,
223- Method :: Options => http_types :: Method :: OPTIONS ,
215+ Method :: Get => hyperium :: Method :: GET ,
216+ Method :: Post => hyperium :: Method :: POST ,
217+ Method :: Put => hyperium :: Method :: PUT ,
218+ Method :: Delete => hyperium :: Method :: DELETE ,
219+ Method :: Patch => hyperium :: Method :: PATCH ,
220+ Method :: Head => hyperium :: Method :: HEAD ,
221+ Method :: Options => hyperium :: Method :: OPTIONS ,
224222 }
225223 }
226224}
227225
228226#[ cfg( feature = "http" ) ]
229- impl < B : TryFromBody > TryFrom < Response > for http_types :: Response < B > {
227+ impl < B : TryFromBody > TryFrom < Response > for hyperium :: Response < B > {
230228 type Error = B :: Error ;
231229 fn try_from ( resp : Response ) -> Result < Self , Self :: Error > {
232- let mut builder = http_types :: Response :: builder ( ) . status ( resp. status ) ;
230+ let mut builder = hyperium :: Response :: builder ( ) . status ( resp. status ) ;
233231 for ( n, v) in resp. headers . unwrap_or_default ( ) {
234232 builder = builder. header ( n, v) ;
235233 }
@@ -254,7 +252,7 @@ impl<R: Into<Response>> IntoResponse for R {
254252}
255253
256254#[ cfg( feature = "http" ) ]
257- impl < B > IntoResponse for http_types :: Response < B >
255+ impl < B > IntoResponse for hyperium :: Response < B >
258256where
259257 B : IntoBody ,
260258{
@@ -352,7 +350,7 @@ impl IntoStatusCode for u16 {
352350}
353351
354352#[ cfg( feature = "http" ) ]
355- impl IntoStatusCode for http_types :: StatusCode {
353+ impl IntoStatusCode for hyperium :: StatusCode {
356354 fn into_status_code ( self ) -> u16 {
357355 self . as_u16 ( )
358356 }
0 commit comments