diff --git a/crates/tls/client/tests/api.rs b/crates/tls/client/tests/api.rs index 7f0e25d19c..849ff392d9 100644 --- a/crates/tls/client/tests/api.rs +++ b/crates/tls/client/tests/api.rs @@ -1009,7 +1009,7 @@ where } } -impl<'a, C, S> io::Read for ServerSession<'a, C, S> +impl io::Read for ServerSession<'_, C, S> where C: DerefMut + Deref>, S: rustls::SideData, @@ -1020,7 +1020,7 @@ where } } -impl<'a, C, S> io::Write for ServerSession<'a, C, S> +impl io::Write for ServerSession<'_, C, S> where C: DerefMut + Deref>, S: rustls::SideData, @@ -1103,7 +1103,7 @@ where } } -impl<'a, C> io::Read for ClientSession<'a, C> +impl io::Read for ClientSession<'_, C> where C: DerefMut + Deref, { @@ -1113,7 +1113,7 @@ where } } -impl<'a, C> io::Write for ClientSession<'a, C> +impl io::Write for ClientSession<'_, C> where C: DerefMut + Deref, { diff --git a/crates/tls/core/src/msgs/codec.rs b/crates/tls/core/src/msgs/codec.rs index 3f56c686ec..effc0ebe24 100644 --- a/crates/tls/core/src/msgs/codec.rs +++ b/crates/tls/core/src/msgs/codec.rs @@ -6,7 +6,7 @@ pub struct Reader<'a> { offs: usize, } -impl<'a> Reader<'a> { +impl Reader<'_> { pub fn init(bytes: &[u8]) -> Reader { Reader { buf: bytes, diff --git a/crates/tls/core/src/msgs/deframer.rs b/crates/tls/core/src/msgs/deframer.rs index c58040b281..a423bd08e9 100644 --- a/crates/tls/core/src/msgs/deframer.rs +++ b/crates/tls/core/src/msgs/deframer.rs @@ -194,7 +194,7 @@ mod tests { } } - impl<'a> io::Read for ByteRead<'a> { + impl io::Read for ByteRead<'_> { fn read(&mut self, buf: &mut [u8]) -> io::Result { let mut len = 0; diff --git a/crates/tls/core/src/msgs/handshake.rs b/crates/tls/core/src/msgs/handshake.rs index 6a84841e08..a446fe0764 100644 --- a/crates/tls/core/src/msgs/handshake.rs +++ b/crates/tls/core/src/msgs/handshake.rs @@ -1008,7 +1008,7 @@ impl ClientHelloPayload { pub fn check_psk_ext_is_last(&self) -> bool { self.extensions .last() - .map_or(false, |ext| ext.get_type() == ExtensionType::PreSharedKey) + .is_some_and(|ext| ext.get_type() == ExtensionType::PreSharedKey) } pub fn get_psk_modes(&self) -> Option<&PSKKeyExchangeModes> { diff --git a/crates/tls/core/src/utils/bs_debug.rs b/crates/tls/core/src/utils/bs_debug.rs index ad73ee6b3c..03dd83f553 100644 --- a/crates/tls/core/src/utils/bs_debug.rs +++ b/crates/tls/core/src/utils/bs_debug.rs @@ -12,7 +12,7 @@ use std::fmt; /// `BsDebug` is not a part of public API of bytes crate. pub(crate) struct BsDebug<'a>(pub(crate) &'a [u8]); -impl<'a> fmt::Debug for BsDebug<'a> { +impl fmt::Debug for BsDebug<'_> { fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> { write!(fmt, "b\"")?; for &c in self.0 {