From 623d9d352d331ee7ef28afc513b390e332322bae Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 23 Nov 2024 09:21:48 +0100 Subject: [PATCH] Fix clippy::needless_lifetimes warning Clippy nightly started warning e.g.: ``` warning: the following explicit lifetimes could be elided: 'conn --> x11rb-async/src/cookie.rs:68:6 | 68 | impl<'conn, C: RequestConnection + ?Sized> Drop for VoidCookie<'conn, C> { | ^^^^^ ^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 68 - impl<'conn, C: RequestConnection + ?Sized> Drop for VoidCookie<'conn, C> { 68 + impl Drop for VoidCookie<'_, C> { | ``` Signed-off-by: Uli Schlachter --- x11rb-async/src/cookie.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x11rb-async/src/cookie.rs b/x11rb-async/src/cookie.rs index 150890ea..6ea61fee 100644 --- a/x11rb-async/src/cookie.rs +++ b/x11rb-async/src/cookie.rs @@ -65,7 +65,7 @@ impl<'conn, C: Connection + ?Sized> VoidCookie<'conn, C> { } } -impl<'conn, C: RequestConnection + ?Sized> Drop for VoidCookie<'conn, C> { +impl Drop for VoidCookie<'_, C> { fn drop(&mut self) { self.conn.discard_reply( self.sequence, @@ -94,7 +94,7 @@ impl<'a, C: RequestConnection + ?Sized> RawCookie<'a, C> { } } -impl<'a, C: RequestConnection + ?Sized> Drop for RawCookie<'a, C> { +impl Drop for RawCookie<'_, C> { fn drop(&mut self) { self.conn.discard_reply( self.sequence,