File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,11 @@ async fn unimplemented() -> impl axum::response::IntoResponse {
140
140
( status, headers)
141
141
}
142
142
143
- impl Service < Request < BoxBody > > for Routes {
143
+ impl < B > Service < Request < B > > for Routes
144
+ where
145
+ B : http_body:: Body < Data = bytes:: Bytes > + Send + ' static ,
146
+ B :: Error : Into < crate :: Error > ,
147
+ {
144
148
type Response = Response < BoxBody > ;
145
149
type Error = crate :: Error ;
146
150
type Future = RoutesFuture ;
@@ -150,8 +154,8 @@ impl Service<Request<BoxBody>> for Routes {
150
154
Poll :: Ready ( Ok ( ( ) ) )
151
155
}
152
156
153
- fn call ( & mut self , req : Request < BoxBody > ) -> Self :: Future {
154
- RoutesFuture ( self . router . call ( req) )
157
+ fn call ( & mut self , req : Request < B > ) -> Self :: Future {
158
+ RoutesFuture ( self . router . call ( req. map ( axum :: body :: Body :: new ) ) )
155
159
}
156
160
}
157
161
You can’t perform that action at this time.
0 commit comments