Skip to content

Commit

Permalink
clippy lifetime elisions in capnpc and capnp-futures
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha committed Nov 15, 2024
1 parent af253b5 commit 1322b2f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion capnp-futures/src/read_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ where
read: Pin<Box<dyn Future<Output = ReadStreamResult<R>> + 'a>>,
}

impl<'a, R> Unpin for ReadStream<'a, R> where R: AsyncRead + Unpin {}
impl<R> Unpin for ReadStream<'_, R> where R: AsyncRead + Unpin {}

impl<'a, R> ReadStream<'a, R>
where
Expand Down
2 changes: 1 addition & 1 deletion capnp-futures/src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub trait AsOutputSegments {
fn as_output_segments(&self) -> OutputSegments;
}

impl<'a, M> AsOutputSegments for &'a M
impl<M> AsOutputSegments for &M
where
M: AsOutputSegments,
{
Expand Down
4 changes: 2 additions & 2 deletions capnpc/src/codegen_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub trait RustTypeInfo {
fn type_string(&self, ctx: &GeneratorContext, module: Leaf) -> Result<String, Error>;
}

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());
Expand Down Expand Up @@ -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<String, Error> {
let local_lifetime = match module {
Leaf::Reader(lt) => lt,
Expand Down

0 comments on commit 1322b2f

Please sign in to comment.