diff --git a/src/lib.rs b/src/lib.rs index 9ad6c6d..c0cb76a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -333,7 +333,7 @@ pub struct ProtoStackIter<'a> { parts: Iter<'a>, } -impl<'a> Iterator for ProtoStackIter<'a> { +impl Iterator for ProtoStackIter<'_> { type Item = &'static str; fn next(&mut self) -> Option { self.parts.next().as_ref().map(Protocol::tag) diff --git a/src/onion_addr.rs b/src/onion_addr.rs index 08cedb7..3800452 100644 --- a/src/onion_addr.rs +++ b/src/onion_addr.rs @@ -4,7 +4,7 @@ use std::{borrow::Cow, fmt}; #[derive(Clone)] pub struct Onion3Addr<'a>(Cow<'a, [u8; 35]>, u16); -impl<'a> Onion3Addr<'a> { +impl Onion3Addr<'_> { /// Return the hash of the public key as bytes pub fn hash(&self) -> &[u8; 35] { self.0.as_ref() diff --git a/src/protocol.rs b/src/protocol.rs index d6e85e9..f0fa1d4 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -725,7 +725,7 @@ impl<'a> Protocol<'a> { } } -impl<'a> fmt::Display for Protocol<'a> { +impl fmt::Display for Protocol<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use self::Protocol::*; write!(f, "/{}", self.tag())?; @@ -788,7 +788,7 @@ impl<'a> fmt::Display for Protocol<'a> { } } -impl<'a> From for Protocol<'a> { +impl From for Protocol<'_> { #[inline] fn from(addr: IpAddr) -> Self { match addr { @@ -798,14 +798,14 @@ impl<'a> From for Protocol<'a> { } } -impl<'a> From for Protocol<'a> { +impl From for Protocol<'_> { #[inline] fn from(addr: Ipv4Addr) -> Self { Protocol::Ip4(addr) } } -impl<'a> From for Protocol<'a> { +impl From for Protocol<'_> { #[inline] fn from(addr: Ipv6Addr) -> Self { Protocol::Ip6(addr)