File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,7 +139,6 @@ panic = "allow"
139139pattern_type_mismatch = " allow"
140140redundant_closure_for_method_calls = " allow"
141141redundant_else = " allow"
142- single_char_lifetime_names = " allow"
143142struct_excessive_bools = " allow" # TODO: bogus lint?
144143trivially_copy_pass_by_ref = " allow"
145144unnecessary_trailing_comma = " allow"
Original file line number Diff line number Diff line change @@ -408,7 +408,7 @@ mod tests {
408408 }
409409
410410 /// Helper to check if the future is ready after polling once.
411- struct PollOnce < ' a , F > ( & ' a mut F ) ;
411+ struct PollOnce < ' fut , F > ( & ' fut mut F ) ;
412412
413413 impl < F , T > Future for PollOnce < ' _ , F >
414414 where
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ impl<T: Buf> Buf for BufList<T> {
5656 }
5757
5858 #[ inline]
59- fn chunks_vectored < ' t > ( & ' t self , dst : & mut [ IoSlice < ' t > ] ) -> usize {
59+ fn chunks_vectored < ' data > ( & ' data self , dst : & mut [ IoSlice < ' data > ] ) -> usize {
6060 if dst. is_empty ( ) {
6161 return 0 ;
6262 }
Original file line number Diff line number Diff line change 6666// being either a real reference, or moving the http::Response into the closure,
6767// in a backwards-compatible change in the future.
6868#[ derive( Debug ) ]
69- pub struct Response < ' a > ( & ' a http:: Response < ( ) > ) ;
69+ pub struct Response < ' resp > ( & ' resp http:: Response < ( ) > ) ;
7070
7171impl Response < ' _ > {
7272 #[ inline]
Original file line number Diff line number Diff line change @@ -113,8 +113,8 @@ impl Protocol {
113113}
114114
115115#[ cfg( feature = "http2" ) ]
116- impl < ' a > From < & ' a str > for Protocol {
117- fn from ( value : & ' a str ) -> Self {
116+ impl < ' proto > From < & ' proto str > for Protocol {
117+ fn from ( value : & ' proto str ) -> Self {
118118 Self {
119119 inner : h2:: ext:: Protocol :: from ( value) ,
120120 }
@@ -165,10 +165,10 @@ impl HeaderCaseMap {
165165 /// Returns a view of all spellings associated with that header name,
166166 /// in the order they were found.
167167 #[ cfg( feature = "client" ) ]
168- pub ( crate ) fn get_all < ' a > (
169- & ' a self ,
168+ pub ( crate ) fn get_all < ' hdr > (
169+ & ' hdr self ,
170170 name : & HeaderName ,
171- ) -> impl Iterator < Item = impl AsRef < [ u8 ] > + ' a > + ' a {
171+ ) -> impl Iterator < Item = impl AsRef < [ u8 ] > + ' hdr > + ' hdr {
172172 self . get_all_internal ( name)
173173 }
174174
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ struct TaskFuture {
128128/// its only purpose is to provide access to the waker. See `hyper_waker`.
129129///
130130/// Corresponding Rust type: <https://doc.rust-lang.org/std/task/struct.Context.html>
131- pub struct hyper_context < ' a > ( Context < ' a > ) ;
131+ pub struct hyper_context < ' ctx > ( Context < ' ctx > ) ;
132132
133133/// A waker that is saved and used to waken a pending task.
134134///
@@ -511,7 +511,9 @@ where
511511// ===== impl hyper_context =====
512512
513513impl hyper_context < ' _ > {
514- pub ( crate ) fn wrap < ' a , ' b > ( cx : & ' a mut Context < ' b > ) -> & ' a mut hyper_context < ' b > {
514+ pub ( crate ) fn wrap < ' borrow , ' ctx > (
515+ cx : & ' borrow mut Context < ' ctx > ,
516+ ) -> & ' borrow mut hyper_context < ' ctx > {
515517 // A struct with only one field has the same layout as that field.
516518 unsafe { std:: mem:: transmute :: < & mut Context < ' _ > , & mut hyper_context < ' _ > > ( cx) }
517519 }
Original file line number Diff line number Diff line change @@ -286,12 +286,12 @@ macro_rules! put_u8 {
286286 } ;
287287}
288288
289- struct StepArgs < ' a > {
290- chunk_size : & ' a mut u64 ,
291- chunk_buf : & ' a mut Option < Bytes > ,
292- extensions_cnt : & ' a mut u64 ,
293- trailers_buf : & ' a mut Option < BytesMut > ,
294- trailers_cnt : & ' a mut usize ,
289+ struct StepArgs < ' args > {
290+ chunk_size : & ' args mut u64 ,
291+ chunk_buf : & ' args mut Option < Bytes > ,
292+ extensions_cnt : & ' args mut u64 ,
293+ trailers_buf : & ' args mut Option < BytesMut > ,
294+ trailers_cnt : & ' args mut usize ,
295295 max_headers_cnt : usize ,
296296 max_headers_bytes : usize ,
297297}
Original file line number Diff line number Diff line change @@ -509,10 +509,10 @@ where
509509
510510/// A drop guard to allow a mutable borrow of an Option while being able to
511511/// set whether the `Option` should be cleared on drop.
512- struct OptGuard < ' a , T > ( Pin < & ' a mut Option < T > > , bool ) ;
512+ struct OptGuard < ' opt , T > ( Pin < & ' opt mut Option < T > > , bool ) ;
513513
514- impl < ' a , T > OptGuard < ' a , T > {
515- fn new ( pin : Pin < & ' a mut Option < T > > ) -> Self {
514+ impl < ' opt , T > OptGuard < ' opt , T > {
515+ fn new ( pin : Pin < & ' opt mut Option < T > > ) -> Self {
516516 OptGuard ( pin, false )
517517 }
518518
Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ where
317317 }
318318
319319 #[ inline]
320- fn chunks_vectored < ' t > ( & ' t self , dst : & mut [ IoSlice < ' t > ] ) -> usize {
320+ fn chunks_vectored < ' data > ( & ' data self , dst : & mut [ IoSlice < ' data > ] ) -> usize {
321321 match & self . kind {
322322 BufKind :: Exact ( b) => b. chunks_vectored ( dst) ,
323323 BufKind :: Limited ( b) => b. chunks_vectored ( dst) ,
Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ impl<B: Buf> Buf for WriteBuf<B> {
637637 }
638638
639639 #[ inline]
640- fn chunks_vectored < ' t > ( & ' t self , dst : & mut [ IoSlice < ' t > ] ) -> usize {
640+ fn chunks_vectored < ' data > ( & ' data self , dst : & mut [ IoSlice < ' data > ] ) -> usize {
641641 let n = self . headers . chunks_vectored ( dst) ;
642642 self . queue . chunks_vectored ( & mut dst[ n..] ) + n
643643 }
You can’t perform that action at this time.
0 commit comments