Skip to content

Commit

Permalink
fix(clippy): latest warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini committed Dec 16, 2024
1 parent ff09886 commit 8aed9b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub struct DualstackMeasureManyStream<'a, I: Iterator<Item = IpAddr>> {
v6: MeasureManyStream<'a, Ipv6Addr, FilterIpAddr<I, Ipv6Addr>>,
}

impl<'a, I: Iterator<Item = IpAddr>> DualstackMeasureManyStream<'a, I> {
impl<I: Iterator<Item = IpAddr>> 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));
Expand All @@ -129,7 +129,7 @@ impl<'a, I: Iterator<Item = IpAddr>> DualstackMeasureManyStream<'a, I> {
}

#[cfg(feature = "stream")]
impl<'a, I: Iterator<Item = IpAddr> + Unpin> Stream for DualstackMeasureManyStream<'a, I> {
impl<I: Iterator<Item = IpAddr> + Unpin> Stream for DualstackMeasureManyStream<'_, I> {
type Item = (IpAddr, Duration);

fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
Expand Down
6 changes: 3 additions & 3 deletions src/pinger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ pub struct MeasureManyStream<'a, V: IpVersion, I: Iterator<Item = V>> {
sequence_number: u16,
}

impl<'a, V: IpVersion, I: Iterator<Item = V>> MeasureManyStream<'a, V, I> {
impl<V: IpVersion, I: Iterator<Item = V>> 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) {
Expand Down Expand Up @@ -353,7 +353,7 @@ impl<'a, V: IpVersion, I: Iterator<Item = V>> MeasureManyStream<'a, V, I> {
}

#[cfg(feature = "stream")]
impl<'a, V: IpVersion, I: Iterator<Item = V> + Unpin> Stream for MeasureManyStream<'a, V, I> {
impl<V: IpVersion, I: Iterator<Item = V> + Unpin> Stream for MeasureManyStream<'_, V, I> {
type Item = (V, Duration);

fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
Expand All @@ -362,7 +362,7 @@ impl<'a, V: IpVersion, I: Iterator<Item = V> + Unpin> Stream for MeasureManyStre
}
}

impl<'a, V: IpVersion, I: Iterator<Item = V>> Drop for MeasureManyStream<'a, V, I> {
impl<V: IpVersion, I: Iterator<Item = V>> Drop for MeasureManyStream<'_, V, I> {
fn drop(&mut self) {
let _ = self
.pinger
Expand Down
4 changes: 2 additions & 2 deletions src/raw_pinger/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub struct SendFuture<'a, V: IpVersion> {
packet: &'a EchoRequestPacket<V>,
}

impl<'a, V: IpVersion> Future for SendFuture<'a, V> {
impl<V: IpVersion> Future for SendFuture<'_, V> {
type Output = io::Result<()>;

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
Expand All @@ -115,7 +115,7 @@ pub struct RecvFuture<'a, V: IpVersion> {
buf: Vec<u8>,
}

impl<'a, V: IpVersion> Future for RecvFuture<'a, V> {
impl<V: IpVersion> Future for RecvFuture<'_, V> {
type Output = io::Result<EchoReplyPacket<'static, V>>;

fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
Expand Down

0 comments on commit 8aed9b8

Please sign in to comment.