From 1322b2f22f41aac4cb85f6e7ede5b0d5901a7c64 Mon Sep 17 00:00:00 2001 From: David Renshaw Date: Fri, 15 Nov 2024 09:03:22 -0500 Subject: [PATCH] clippy lifetime elisions in capnpc and capnp-futures --- capnp-futures/src/read_stream.rs | 2 +- capnp-futures/src/serialize.rs | 2 +- capnpc/src/codegen_types.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/capnp-futures/src/read_stream.rs b/capnp-futures/src/read_stream.rs index 8a88fe53c..eceece0e2 100644 --- a/capnp-futures/src/read_stream.rs +++ b/capnp-futures/src/read_stream.rs @@ -50,7 +50,7 @@ where read: Pin> + 'a>>, } -impl<'a, R> Unpin for ReadStream<'a, R> where R: AsyncRead + Unpin {} +impl Unpin for ReadStream<'_, R> where R: AsyncRead + Unpin {} impl<'a, R> ReadStream<'a, R> where diff --git a/capnp-futures/src/serialize.rs b/capnp-futures/src/serialize.rs index 7a8322e90..d8ff865bb 100644 --- a/capnp-futures/src/serialize.rs +++ b/capnp-futures/src/serialize.rs @@ -160,7 +160,7 @@ pub trait AsOutputSegments { fn as_output_segments(&self) -> OutputSegments; } -impl<'a, M> AsOutputSegments for &'a M +impl AsOutputSegments for &M where M: AsOutputSegments, { diff --git a/capnpc/src/codegen_types.rs b/capnpc/src/codegen_types.rs index ed87173a0..94ddc0792 100644 --- a/capnpc/src/codegen_types.rs +++ b/capnpc/src/codegen_types.rs @@ -103,7 +103,7 @@ pub trait RustTypeInfo { fn type_string(&self, ctx: &GeneratorContext, module: Leaf) -> Result; } -impl<'a> RustNodeInfo for node::Reader<'a> { +impl RustNodeInfo for node::Reader<'_> { fn parameters_texts(&self, ctx: &GeneratorContext) -> TypeParameterTexts { if self.get_is_generic() { let params = get_type_parameters(ctx, self.get_id()); @@ -160,7 +160,7 @@ impl<'a> RustNodeInfo for node::Reader<'a> { } } -impl<'a> RustTypeInfo for type_::Reader<'a> { +impl RustTypeInfo for type_::Reader<'_> { fn type_string(&self, ctx: &GeneratorContext, module: Leaf) -> Result { let local_lifetime = match module { Leaf::Reader(lt) => lt,