@@ -67,10 +67,13 @@ impl Drop for LocalResponse<'_> {
6767}
6868
6969impl < ' c > LocalResponse < ' c > {
70- pub ( crate ) fn new < P , PO , F , O > ( req : Request < ' c > , mut data : Data < ' c > , preprocess : P , f : F ) -> impl Future < Output = LocalResponse < ' c > >
71- where P : FnOnce ( & ' c mut Request < ' c > , & ' c mut Data < ' c > , & ' c mut ErasedError < ' c > ) -> PO + Send ,
70+ pub ( crate ) fn new < P , PO , F , O > ( req : Request < ' c > , mut data : Data < ' c > , preprocess : P , f : F )
71+ -> impl Future < Output = LocalResponse < ' c > >
72+ where P : FnOnce ( & ' c mut Request < ' c > , & ' c mut Data < ' c > , & ' c mut ErasedError < ' c > )
73+ -> PO + Send ,
7274 PO : Future < Output = RequestToken > + Send + ' c ,
73- F : FnOnce ( RequestToken , & ' c Request < ' c > , Data < ' c > , & ' c mut ErasedError < ' c > ) -> O + Send ,
75+ F : FnOnce ( RequestToken , & ' c Request < ' c > , Data < ' c > , & ' c mut ErasedError < ' c > )
76+ -> O + Send ,
7477 O : Future < Output = Response < ' c > > + Send + ' c
7578 {
7679 // `LocalResponse` is a self-referential structure. In particular,
@@ -121,7 +124,12 @@ impl<'c> LocalResponse<'c> {
121124 // the value is used to set cookie defaults.
122125 // SAFETY: The type of `preprocess` ensures that all of these types have the correct
123126 // lifetime ('c).
124- let response: Response < ' c > = f ( token, request, data, unsafe { transmute ( & mut error) } ) . await ;
127+ let response: Response < ' c > = f (
128+ token,
129+ request,
130+ data,
131+ unsafe { transmute ( & mut error) }
132+ ) . await ;
125133 let mut cookies = CookieJar :: new ( None , request. rocket ( ) ) ;
126134 for cookie in response. cookies ( ) {
127135 cookies. add_original ( cookie. into_owned ( ) ) ;
0 commit comments