From 8aed9b804c794afcbde02b33597c673e7be3f3ed Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Mon, 16 Dec 2024 09:46:09 +0100 Subject: [PATCH] fix(clippy): latest warnings --- src/lib.rs | 4 ++-- src/pinger.rs | 6 +++--- src/raw_pinger/mod.rs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e028da5..f1019a9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -114,7 +114,7 @@ pub struct DualstackMeasureManyStream<'a, I: Iterator> { v6: MeasureManyStream<'a, Ipv6Addr, FilterIpAddr>, } -impl<'a, I: Iterator> DualstackMeasureManyStream<'a, I> { +impl> DualstackMeasureManyStream<'_, I> { pub fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<(IpAddr, Duration)> { if let Poll::Ready((v4, rtt)) = self.v4.poll_next_unpin(cx) { return Poll::Ready((IpAddr::V4(v4), rtt)); @@ -129,7 +129,7 @@ impl<'a, I: Iterator> DualstackMeasureManyStream<'a, I> { } #[cfg(feature = "stream")] -impl<'a, I: Iterator + Unpin> Stream for DualstackMeasureManyStream<'a, I> { +impl + Unpin> Stream for DualstackMeasureManyStream<'_, I> { type Item = (IpAddr, Duration); fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { diff --git a/src/pinger.rs b/src/pinger.rs index fbe30e1..645fd85 100644 --- a/src/pinger.rs +++ b/src/pinger.rs @@ -279,7 +279,7 @@ pub struct MeasureManyStream<'a, V: IpVersion, I: Iterator> { sequence_number: u16, } -impl<'a, V: IpVersion, I: Iterator> MeasureManyStream<'a, V, I> { +impl> MeasureManyStream<'_, V, I> { pub fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<(V, Duration)> { // Try to see if another `MeasureManyStream` got it if let Poll::Ready(Some((addr, rtt))) = self.poll_next_from_different_round(cx) { @@ -353,7 +353,7 @@ impl<'a, V: IpVersion, I: Iterator> MeasureManyStream<'a, V, I> { } #[cfg(feature = "stream")] -impl<'a, V: IpVersion, I: Iterator + Unpin> Stream for MeasureManyStream<'a, V, I> { +impl + Unpin> Stream for MeasureManyStream<'_, V, I> { type Item = (V, Duration); fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { @@ -362,7 +362,7 @@ impl<'a, V: IpVersion, I: Iterator + Unpin> Stream for MeasureManyStre } } -impl<'a, V: IpVersion, I: Iterator> Drop for MeasureManyStream<'a, V, I> { +impl> Drop for MeasureManyStream<'_, V, I> { fn drop(&mut self) { let _ = self .pinger diff --git a/src/raw_pinger/mod.rs b/src/raw_pinger/mod.rs index 82535b2..ecddab8 100644 --- a/src/raw_pinger/mod.rs +++ b/src/raw_pinger/mod.rs @@ -101,7 +101,7 @@ pub struct SendFuture<'a, V: IpVersion> { packet: &'a EchoRequestPacket, } -impl<'a, V: IpVersion> Future for SendFuture<'a, V> { +impl Future for SendFuture<'_, V> { type Output = io::Result<()>; fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { @@ -115,7 +115,7 @@ pub struct RecvFuture<'a, V: IpVersion> { buf: Vec, } -impl<'a, V: IpVersion> Future for RecvFuture<'a, V> { +impl Future for RecvFuture<'_, V> { type Output = io::Result>; fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll {