Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::Item> {
self.parts.next().as_ref().map(Protocol::tag)
Expand Down
2 changes: 1 addition & 1 deletion src/onion_addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())?;
Expand Down Expand Up @@ -788,7 +788,7 @@ impl<'a> fmt::Display for Protocol<'a> {
}
}

impl<'a> From<IpAddr> for Protocol<'a> {
impl From<IpAddr> for Protocol<'_> {
#[inline]
fn from(addr: IpAddr) -> Self {
match addr {
Expand All @@ -798,14 +798,14 @@ impl<'a> From<IpAddr> for Protocol<'a> {
}
}

impl<'a> From<Ipv4Addr> for Protocol<'a> {
impl From<Ipv4Addr> for Protocol<'_> {
#[inline]
fn from(addr: Ipv4Addr) -> Self {
Protocol::Ip4(addr)
}
}

impl<'a> From<Ipv6Addr> for Protocol<'a> {
impl From<Ipv6Addr> for Protocol<'_> {
#[inline]
fn from(addr: Ipv6Addr) -> Self {
Protocol::Ip6(addr)
Expand Down