diff --git a/statime/src/datastructures/common/tlv.rs b/statime/src/datastructures/common/tlv.rs index 6589fa7d7..b231bfea7 100644 --- a/statime/src/datastructures/common/tlv.rs +++ b/statime/src/datastructures/common/tlv.rs @@ -31,7 +31,7 @@ pub(crate) struct TlvSet<'a> { bytes: &'a [u8], } -impl<'a> core::fmt::Debug for TlvSet<'a> { +impl core::fmt::Debug for TlvSet<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { f.debug_struct("TlvSet") .field("wire_size", &self.wire_size()) @@ -102,7 +102,7 @@ pub(crate) struct TlvSetIterator<'a> { buffer: &'a [u8], } -impl<'a> TlvSetIterator<'a> { +impl TlvSetIterator<'_> { pub(crate) fn empty() -> Self { Self { buffer: &[] } } @@ -126,7 +126,7 @@ impl<'a> Iterator for TlvSetIterator<'a> { } } -impl<'a> FusedIterator for TlvSetIterator<'a> {} +impl FusedIterator for TlvSetIterator<'_> {} #[derive(Debug, Clone, PartialEq, Eq)] pub(crate) struct Tlv<'a> { diff --git a/statime/src/port/actions.rs b/statime/src/port/actions.rs index e54b0cdfe..a9fae9b89 100644 --- a/statime/src/port/actions.rs +++ b/statime/src/port/actions.rs @@ -14,7 +14,7 @@ pub struct ForwardedTLV<'a> { pub(super) sender_identity: PortIdentity, } -impl<'a> ForwardedTLV<'a> { +impl ForwardedTLV<'_> { /// Wire size of the TLV. Can be used to determine how many TLV's to keep pub fn size(&self) -> usize { self.tlv.wire_size() diff --git a/statime/src/port/bmca.rs b/statime/src/port/bmca.rs index 92dcecb93..e6321538d 100644 --- a/statime/src/port/bmca.rs +++ b/statime/src/port/bmca.rs @@ -19,8 +19,8 @@ use crate::{ Clock, }; -impl<'a, A: AcceptableMasterList, C: Clock, F: Filter, R: Rng, S: PtpInstanceStateMutex> - Port<'a, Running, A, R, C, F, S> +impl + Port<'_, Running, A, R, C, F, S> { pub(super) fn handle_announce<'b>( &'b mut self, @@ -105,15 +105,15 @@ impl<'a, A: AcceptableMasterList, C: Clock, F: Filter, R: Rng, S: PtpInstanceSta } // BMCA related functionality of the port -impl<'a, A: AcceptableMasterList, C: Clock, F: Filter, R: Rng, S: PtpInstanceStateMutex> - Port<'a, InBmca, A, R, C, F, S> +impl + Port<'_, InBmca, A, R, C, F, S> { pub(crate) fn calculate_best_local_announce_message(&mut self) { self.lifecycle.local_best = self.bmca.take_best_port_announce_message() } } -impl<'a, A, C: Clock, F: Filter, R: Rng, S: PtpInstanceStateMutex> Port<'a, InBmca, A, R, C, F, S> { +impl Port<'_, InBmca, A, R, C, F, S> { pub(crate) fn step_announce_age(&mut self, step: Duration) { if let Some(mut age) = self.multiport_disable.take() { age += step; diff --git a/statime/src/port/master.rs b/statime/src/port/master.rs index 18fc74974..03653f215 100644 --- a/statime/src/port/master.rs +++ b/statime/src/port/master.rs @@ -12,7 +12,7 @@ use crate::{ time::Time, }; -impl<'a, A, C, F: Filter, R, S: PtpInstanceStateMutex> Port<'a, Running, A, R, C, F, S> { +impl Port<'_, Running, A, R, C, F, S> { pub(super) fn send_sync(&mut self) -> PortActionIterator { if matches!(self.port_state, PortState::Master) { log::trace!("sending sync message"); diff --git a/statime/src/port/slave.rs b/statime/src/port/slave.rs index d1c794871..cc291b469 100644 --- a/statime/src/port/slave.rs +++ b/statime/src/port/slave.rs @@ -17,7 +17,7 @@ use crate::{ Clock, }; -impl<'a, A, C: Clock, F: Filter, R, S> Port<'a, Running, A, R, C, F, S> { +impl Port<'_, Running, A, R, C, F, S> { pub(super) fn handle_time_measurement<'b>(&mut self) -> PortActionIterator<'b> { if let Some(measurement) = self.extract_measurement() { // If the received message allowed the (slave) state to calculate its offset @@ -456,9 +456,7 @@ impl<'a, A, C: Clock, F: Filter, R, S> Port<'a, Running, A, R, C, F, S> { } } -impl<'a, A, C: Clock, F: Filter, R: Rng, S: PtpInstanceStateMutex> - Port<'a, Running, A, R, C, F, S> -{ +impl Port<'_, Running, A, R, C, F, S> { pub(super) fn send_delay_request(&mut self) -> PortActionIterator { match self.config.delay_mechanism { DelayMechanism::E2E { interval } => self.send_e2e_delay_request(interval),