@@ -302,21 +302,15 @@ where
302302}
303303
304304/// 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 > {
309306 fn on_response ( res : & mut Response < ResBody > , req : & RedirectingRequest < S , ReqBody , P > ) ;
310307}
311308
312309/// Default behavior: adds a [`RequestUri`] extension to the response.
313310#[ derive( Default , Clone , Copy ) ]
314311pub struct UriExtension { }
315312
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 {
320314 #[ inline]
321315 fn on_response ( res : & mut Response < ResBody > , req : & RedirectingRequest < S , ReqBody , P > ) {
322316 res. extensions_mut ( ) . insert ( RequestUri ( req. uri . clone ( ) ) ) ;
@@ -329,7 +323,6 @@ pub struct UriAndPolicyExtensions {}
329323
330324impl < ReqBody , ResBody , S , P > ResponseHandler < ReqBody , ResBody , S , P > for UriAndPolicyExtensions
331325where
332- S : Service < Request < ReqBody > > ,
333326 P : Clone + Send + Sync + ' static ,
334327{
335328 #[ inline]
0 commit comments