From 63ea5df6f71855bb88044a042842d419084799f6 Mon Sep 17 00:00:00 2001 From: Will Greenberg Date: Tue, 23 Jun 2026 13:19:03 -0700 Subject: [PATCH] appease clippy --- lib/src/gsmtap/mac.rs | 14 +++++++------- lib/src/gsmtap/parser.rs | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/src/gsmtap/mac.rs b/lib/src/gsmtap/mac.rs index db89768..52e7bce 100644 --- a/lib/src/gsmtap/mac.rs +++ b/lib/src/gsmtap/mac.rs @@ -40,23 +40,23 @@ pub enum Direction { #[deku(id_type = "u8")] pub enum RntiType { #[deku(id = "0")] - NO, + No, #[deku(id = "1")] P, #[deku(id = "2")] - RA, + Ra, #[deku(id = "3")] C, #[deku(id = "4")] - SI, + Ri, #[deku(id = "5")] - SPS, + Sps, #[deku(id = "6")] M, #[deku(id = "7")] - SL, + Sl, #[deku(id = "9")] - SC, + Sc, #[deku(id = "10")] G, } @@ -97,7 +97,7 @@ pub fn mac_subpacket_to_gsmtap( Header { radio_type: RadioType::Fdd, direction: Direction::Downlink, - rnti_type: RntiType::RA, + rnti_type: RntiType::Ra, } .to_bytes()?, ); diff --git a/lib/src/gsmtap/parser.rs b/lib/src/gsmtap/parser.rs index dc0ae23..837d22b 100644 --- a/lib/src/gsmtap/parser.rs +++ b/lib/src/gsmtap/parser.rs @@ -175,10 +175,10 @@ fn log_to_gsmtap(value: LogBody) -> Result, GsmtapParserEr packet.subpackets.len() ); } - let Some(subpacket) = packet.subpackets.get(0) else { - return Err(GsmtapParserError::InvalidLteMacRachResponse(format!( - "no subpackets" - ))); + let Some(subpacket) = packet.subpackets.first() else { + return Err(GsmtapParserError::InvalidLteMacRachResponse( + "no subpackets".to_string(), + )); }; mac_subpacket_to_gsmtap(&subpacket.body).map_err(|err| { GsmtapParserError::InvalidLteMacRachResponse(format!(