@@ -302,21 +302,15 @@ where
302
302
}
303
303
304
304
/// Called on each new response, can be used for example to add [`http::Extensions`]
305
- trait ResponseHandler < ReqBody , ResBody , S , P > : Sized
306
- where
307
- S : Service < Request < ReqBody > > ,
308
- {
305
+ trait ResponseHandler < ReqBody , ResBody , S , P > {
309
306
fn on_response ( res : & mut Response < ResBody > , req : & RedirectingRequest < S , ReqBody , P > ) ;
310
307
}
311
308
312
309
/// Default behavior: adds a [`RequestUri`] extension to the response.
313
310
#[ derive( Default , Clone , Copy ) ]
314
311
pub struct UriExtension { }
315
312
316
- impl < ReqBody , ResBody , S , P > ResponseHandler < ReqBody , ResBody , S , P > for UriExtension
317
- where
318
- S : Service < Request < ReqBody > > ,
319
- {
313
+ impl < ReqBody , ResBody , S , P > ResponseHandler < ReqBody , ResBody , S , P > for UriExtension {
320
314
#[ inline]
321
315
fn on_response ( res : & mut Response < ResBody > , req : & RedirectingRequest < S , ReqBody , P > ) {
322
316
res. extensions_mut ( ) . insert ( RequestUri ( req. uri . clone ( ) ) ) ;
@@ -329,7 +323,6 @@ pub struct UriAndPolicyExtensions {}
329
323
330
324
impl < ReqBody , ResBody , S , P > ResponseHandler < ReqBody , ResBody , S , P > for UriAndPolicyExtensions
331
325
where
332
- S : Service < Request < ReqBody > > ,
333
326
P : Clone + Send + Sync + ' static ,
334
327
{
335
328
#[ inline]
0 commit comments