Skip to content

Commit a4184b3

Browse files
committed
elide some lifetimes per clippy
1 parent 3743526 commit a4184b3

File tree

14 files changed

+41
-41
lines changed

14 files changed

+41
-41
lines changed

capnp/src/any_pointer_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl<'a> From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
207207
}
208208
}
209209

210-
impl<'a> core::fmt::Debug for Reader<'a> {
210+
impl core::fmt::Debug for Reader<'_> {
211211
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
212212
core::fmt::Debug::fmt(
213213
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),

capnp/src/capability_list.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ where
7070
*self
7171
}
7272
}
73-
impl<'a, T> Copy for Reader<'a, T> where T: FromClientHook {}
73+
impl<T> Copy for Reader<'_, T> where T: FromClientHook {}
7474

7575
impl<'a, T> Reader<'a, T>
7676
where
@@ -89,7 +89,7 @@ where
8989
}
9090
}
9191

92-
impl<'a, T> Reader<'a, T>
92+
impl<T> Reader<'_, T>
9393
where
9494
T: FromClientHook,
9595
{
@@ -116,7 +116,7 @@ where
116116
}
117117
}
118118

119-
impl<'a, T> Reader<'a, T>
119+
impl<T> Reader<'_, T>
120120
where
121121
T: FromClientHook,
122122
{
@@ -145,7 +145,7 @@ where
145145
}
146146
}
147147

148-
impl<'a, T> IndexMove<u32, Result<T>> for Reader<'a, T>
148+
impl<T> IndexMove<u32, Result<T>> for Reader<'_, T>
149149
where
150150
T: FromClientHook,
151151
{
@@ -190,7 +190,7 @@ where
190190
}
191191
}
192192

193-
impl<'a, T> Builder<'a, T>
193+
impl<T> Builder<'_, T>
194194
where
195195
T: FromClientHook,
196196
{
@@ -223,7 +223,7 @@ where
223223
}
224224
}
225225

226-
impl<'a, T> Builder<'a, T>
226+
impl<T> Builder<'_, T>
227227
where
228228
T: FromClientHook,
229229
{
@@ -296,7 +296,7 @@ impl<'a, T: FromClientHook> From<Builder<'a, T>> for crate::dynamic_value::Build
296296
}
297297
}
298298

299-
impl<'a, T: FromClientHook> core::fmt::Debug for Reader<'a, T> {
299+
impl<T: FromClientHook> core::fmt::Debug for Reader<'_, T> {
300300
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
301301
core::fmt::Debug::fmt(
302302
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(self.reborrow()),

capnp/src/data_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl<'a> crate::dynamic_value::DowncastBuilder<'a> for Builder<'a> {
248248
}
249249
}
250250

251-
impl<'a> core::fmt::Debug for Reader<'a> {
251+
impl core::fmt::Debug for Reader<'_> {
252252
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
253253
core::fmt::Debug::fmt(
254254
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),

capnp/src/dynamic_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ impl<'a> crate::traits::SetterInput<crate::any_pointer::Owned> for Reader<'a> {
407407
}
408408
}
409409

410-
impl<'a> core::fmt::Debug for Reader<'a> {
410+
impl core::fmt::Debug for Reader<'_> {
411411
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
412412
core::fmt::Debug::fmt(
413413
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),

capnp/src/dynamic_struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ impl<'a> crate::traits::SetterInput<crate::any_pointer::Owned> for Reader<'a> {
809809
}
810810
}
811811

812-
impl<'a> core::fmt::Debug for Reader<'a> {
812+
impl core::fmt::Debug for Reader<'_> {
813813
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
814814
core::fmt::Debug::fmt(
815815
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),

capnp/src/enum_list.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ impl<'a, T: TryFrom<u16, Error = NotInSchema>> FromPointerReader<'a> for Reader<
8484
}
8585
}
8686

87-
impl<'a, T: TryFrom<u16, Error = NotInSchema>>
88-
IndexMove<u32, ::core::result::Result<T, NotInSchema>> for Reader<'a, T>
87+
impl<T: TryFrom<u16, Error = NotInSchema>> IndexMove<u32, ::core::result::Result<T, NotInSchema>>
88+
for Reader<'_, T>
8989
{
9090
fn index_move(&self, index: u32) -> ::core::result::Result<T, NotInSchema> {
9191
self.get(index)
9292
}
9393
}
9494

95-
impl<'a, T: TryFrom<u16, Error = NotInSchema>> Reader<'a, T> {
95+
impl<T: TryFrom<u16, Error = NotInSchema>> Reader<'_, T> {
9696
/// Gets the `T` at position `index`. Panics if `index` is greater than or
9797
/// equal to `len()`.
9898
pub fn get(&self, index: u32) -> ::core::result::Result<T, NotInSchema> {
@@ -167,7 +167,7 @@ impl<'a, T: TryFrom<u16, Error = NotInSchema>> FromPointerBuilder<'a> for Builde
167167
}
168168
}
169169

170-
impl<'a, T: Into<u16> + TryFrom<u16, Error = NotInSchema>> Builder<'a, T> {
170+
impl<T: Into<u16> + TryFrom<u16, Error = NotInSchema>> Builder<'_, T> {
171171
/// Gets the `T` at position `index`. Panics if `index` is greater than or
172172
/// equal to `len()`.
173173
pub fn get(&self, index: u32) -> ::core::result::Result<T, NotInSchema> {
@@ -292,8 +292,8 @@ impl<'a, T: TryFrom<u16, Error = NotInSchema> + crate::introspect::Introspect>
292292
}
293293
}
294294

295-
impl<'a, T: Copy + TryFrom<u16, Error = NotInSchema> + crate::introspect::Introspect>
296-
core::fmt::Debug for Reader<'a, T>
295+
impl<T: Copy + TryFrom<u16, Error = NotInSchema> + crate::introspect::Introspect> core::fmt::Debug
296+
for Reader<'_, T>
297297
{
298298
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
299299
core::fmt::Debug::fmt(

capnp/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ impl<'a> core::ops::Deref for OutputSegments<'a> {
638638
}
639639
}
640640

641-
impl<'s> message::ReaderSegments for OutputSegments<'s> {
641+
impl message::ReaderSegments for OutputSegments<'_> {
642642
fn get_segment(&self, id: u32) -> Option<&[u8]> {
643643
match self {
644644
OutputSegments::SingleSegment(s) => s.get(id as usize).copied(),

capnp/src/list_list.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ where
8585
}
8686
}
8787

88-
impl<'a, T> Copy for Reader<'a, T> where T: crate::traits::Owned {}
88+
impl<T> Copy for Reader<'_, T> where T: crate::traits::Owned {}
8989

9090
impl<'a, T> IndexMove<u32, Result<T::Reader<'a>>> for Reader<'a, T>
9191
where
@@ -182,7 +182,7 @@ where
182182
}
183183
}
184184

185-
impl<'a, T> Builder<'a, T>
185+
impl<T> Builder<'_, T>
186186
where
187187
T: crate::traits::Owned,
188188
{
@@ -315,7 +315,7 @@ impl<'a, T: crate::traits::Owned> crate::dynamic_value::DowncastBuilder<'a> for
315315
}
316316
}
317317

318-
impl<'a, T: crate::traits::Owned> core::fmt::Debug for Reader<'a, T> {
318+
impl<T: crate::traits::Owned> core::fmt::Debug for Reader<'_, T> {
319319
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
320320
core::fmt::Debug::fmt(
321321
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),

capnp/src/message.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl<'a> SegmentArray<'a> {
189189
}
190190
}
191191

192-
impl<'b> ReaderSegments for SegmentArray<'b> {
192+
impl ReaderSegments for SegmentArray<'_> {
193193
fn get_segment(&self, id: u32) -> Option<&[u8]> {
194194
self.segments.get(id as usize).copied()
195195
}
@@ -199,7 +199,7 @@ impl<'b> ReaderSegments for SegmentArray<'b> {
199199
}
200200
}
201201

202-
impl<'b> ReaderSegments for [&'b [u8]] {
202+
impl ReaderSegments for [&[u8]] {
203203
fn get_segment(&self, id: u32) -> Option<&[u8]> {
204204
self.get(id as usize).copied()
205205
}
@@ -871,7 +871,7 @@ impl<'a> ScratchSpaceHeapAllocator<'a> {
871871
}
872872

873873
#[cfg(feature = "alloc")]
874-
unsafe impl<'a> Allocator for ScratchSpaceHeapAllocator<'a> {
874+
unsafe impl Allocator for ScratchSpaceHeapAllocator<'_> {
875875
fn allocate_segment(&mut self, minimum_size: u32) -> (*mut u8, u32) {
876876
if (minimum_size as usize) < (self.scratch_space.len() / BYTES_PER_WORD)
877877
&& !self.scratch_space_allocated
@@ -953,7 +953,7 @@ impl<'a> SingleSegmentAllocator<'a> {
953953
}
954954
}
955955

956-
unsafe impl<'a> Allocator for SingleSegmentAllocator<'a> {
956+
unsafe impl Allocator for SingleSegmentAllocator<'_> {
957957
fn allocate_segment(&mut self, minimum_size: u32) -> (*mut u8, u32) {
958958
let available_word_count = self.segment.len() / BYTES_PER_WORD;
959959
if (minimum_size as usize) > available_word_count {
@@ -989,7 +989,7 @@ unsafe impl<'a> Allocator for SingleSegmentAllocator<'a> {
989989
}
990990
}
991991

992-
unsafe impl<'a, A> Allocator for &'a mut A
992+
unsafe impl<A> Allocator for &'_ mut A
993993
where
994994
A: Allocator,
995995
{

capnp/src/primitive_list.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ impl<'a, T: PrimitiveElement> FromPointerReader<'a> for Reader<'a, T> {
8888
}
8989
}
9090

91-
impl<'a, T: PrimitiveElement> IndexMove<u32, T> for Reader<'a, T> {
91+
impl<T: PrimitiveElement> IndexMove<u32, T> for Reader<'_, T> {
9292
fn index_move(&self, index: u32) -> T {
9393
self.get(index)
9494
}
9595
}
9696

97-
impl<'a, T: PrimitiveElement> Reader<'a, T> {
97+
impl<T: PrimitiveElement> Reader<'_, T> {
9898
/// Gets the `T` at position `index`. Panics if `index` is greater than or
9999
/// equal to `len()`.
100100
pub fn get(&self, index: u32) -> T {
@@ -248,7 +248,7 @@ impl<'a, T: PrimitiveElement> FromPointerBuilder<'a> for Builder<'a, T> {
248248
}
249249
}
250250

251-
impl<'a, T: PrimitiveElement> Builder<'a, T> {
251+
impl<T: PrimitiveElement> Builder<'_, T> {
252252
/// Gets the `T` at position `index`. Panics if `index` is greater than or
253253
/// equal to `len()`.
254254
pub fn get(&self, index: u32) -> T {
@@ -381,8 +381,8 @@ impl<'a, T: PrimitiveElement + crate::introspect::Introspect>
381381
}
382382
}
383383

384-
impl<'a, T: Copy + PrimitiveElement + crate::introspect::Introspect> core::fmt::Debug
385-
for Reader<'a, T>
384+
impl<T: Copy + PrimitiveElement + crate::introspect::Introspect> core::fmt::Debug
385+
for Reader<'_, T>
386386
{
387387
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
388388
core::fmt::Debug::fmt(

0 commit comments

Comments
 (0)