File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
src/decompression/request Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414## Changed
1515
1616- Bump Minimum Supported Rust Version to 1.66 ([ #433 ] )
17+ - Preserve service error type in RequestDecompression ([ #368 ] )
1718
1819## Removed
1920
@@ -26,6 +27,7 @@ http-range-header to `0.4`
2627
2728[ #418 ] : https://github.com/tower-rs/tower-http/pull/418
2829[ #433 ] : https://github.com/tower-rs/tower-http/pull/433
30+ [ #368 ] : https://github.com/tower-rs/tower-http/pull/368
2931
3032# 0.4.2 (July 19, 2023)
3133
Original file line number Diff line number Diff line change @@ -67,16 +67,14 @@ where
6767 B : Body + Send + ' static ,
6868 B :: Data : Buf + ' static ,
6969 B :: Error : Into < BoxError > + ' static ,
70- E : Into < BoxError > ,
7170{
72- type Output = Result < Response < UnsyncBoxBody < B :: Data , BoxError > > , BoxError > ;
71+ type Output = Result < Response < UnsyncBoxBody < B :: Data , BoxError > > , E > ;
7372
7473 fn poll ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
7574 match self . project ( ) . kind . project ( ) {
7675 StateProj :: Inner { fut } => fut
7776 . poll ( cx)
78- . map_ok ( |res| res. map ( |body| body. map_err ( Into :: into) . boxed_unsync ( ) ) )
79- . map_err ( Into :: into) ,
77+ . map_ok ( |res| res. map ( |body| body. map_err ( Into :: into) . boxed_unsync ( ) ) ) ,
8078 StateProj :: Unsupported { accept } => {
8179 let res = Response :: builder ( )
8280 . header (
Original file line number Diff line number Diff line change @@ -42,16 +42,15 @@ where
4242 S : Service < Request < DecompressionBody < ReqBody > > , Response = Response < ResBody > > ,
4343 ReqBody : Body ,
4444 ResBody : Body < Data = D > + Send + ' static ,
45- S :: Error : Into < BoxError > ,
4645 <ResBody as Body >:: Error : Into < BoxError > ,
4746 D : Buf + ' static ,
4847{
4948 type Response = Response < UnsyncBoxBody < D , BoxError > > ;
50- type Error = BoxError ;
49+ type Error = S :: Error ;
5150 type Future = ResponseFuture < S :: Future , ResBody , S :: Error > ;
5251
5352 fn poll_ready ( & mut self , cx : & mut Context < ' _ > ) -> Poll < Result < ( ) , Self :: Error > > {
54- self . inner . poll_ready ( cx) . map_err ( Into :: into )
53+ self . inner . poll_ready ( cx)
5554 }
5655
5756 fn call ( & mut self , req : Request < ReqBody > ) -> Self :: Future {
You can’t perform that action at this time.
0 commit comments