diff --git a/ntp-proto/src/packet/mod.rs b/ntp-proto/src/packet/mod.rs index aa7648357..e565437e9 100644 --- a/ntp-proto/src/packet/mod.rs +++ b/ntp-proto/src/packet/mod.rs @@ -973,16 +973,16 @@ impl<'a> NtpPacket<'a> { #[cfg(feature = "ntpv5")] pub fn is_upgrade(&self) -> bool { - match (self.header, self.draft_id()) { + matches!( + (self.header, self.draft_id()), ( NtpHeader::V4(NtpHeaderV3V4 { reference_timestamp: v5::UPGRADE_TIMESTAMP, .. }), Some(v5::DRAFT_VERSION), - ) => true, - _ => false, - } + ) + ) } pub fn valid_server_response(&self, identifier: RequestIdentifier, nts_enabled: bool) -> bool {