appease clippy

This commit is contained in:
Will Greenberg
2026-06-23 13:19:03 -07:00
committed by Will Greenberg
parent 2d4b36432a
commit 17c301d8e2
2 changed files with 11 additions and 11 deletions
+7 -7
View File
@@ -40,23 +40,23 @@ pub enum Direction {
#[deku(id_type = "u8")] #[deku(id_type = "u8")]
pub enum RntiType { pub enum RntiType {
#[deku(id = "0")] #[deku(id = "0")]
NO, No,
#[deku(id = "1")] #[deku(id = "1")]
P, P,
#[deku(id = "2")] #[deku(id = "2")]
RA, Ra,
#[deku(id = "3")] #[deku(id = "3")]
C, C,
#[deku(id = "4")] #[deku(id = "4")]
SI, Ri,
#[deku(id = "5")] #[deku(id = "5")]
SPS, Sps,
#[deku(id = "6")] #[deku(id = "6")]
M, M,
#[deku(id = "7")] #[deku(id = "7")]
SL, Sl,
#[deku(id = "9")] #[deku(id = "9")]
SC, Sc,
#[deku(id = "10")] #[deku(id = "10")]
G, G,
} }
@@ -97,7 +97,7 @@ pub fn mac_subpacket_to_gsmtap(
Header { Header {
radio_type: RadioType::Fdd, radio_type: RadioType::Fdd,
direction: Direction::Downlink, direction: Direction::Downlink,
rnti_type: RntiType::RA, rnti_type: RntiType::Ra,
} }
.to_bytes()?, .to_bytes()?,
); );
+4 -4
View File
@@ -175,10 +175,10 @@ fn log_to_gsmtap(value: LogBody) -> Result<Option<GsmtapMessage>, GsmtapParserEr
packet.subpackets.len() packet.subpackets.len()
); );
} }
let Some(subpacket) = packet.subpackets.get(0) else { let Some(subpacket) = packet.subpackets.first() else {
return Err(GsmtapParserError::InvalidLteMacRachResponse(format!( return Err(GsmtapParserError::InvalidLteMacRachResponse(
"no subpackets" "no subpackets".to_string(),
))); ));
}; };
mac_subpacket_to_gsmtap(&subpacket.body).map_err(|err| { mac_subpacket_to_gsmtap(&subpacket.body).map_err(|err| {
GsmtapParserError::InvalidLteMacRachResponse(format!( GsmtapParserError::InvalidLteMacRachResponse(format!(