From 805065a7b9be27a04d459ab5bbb058e231d297c4 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 17 Aug 2023 22:13:00 +0200 Subject: [PATCH] cargo fmt --- src/cfdp/pdu/mod.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/cfdp/pdu/mod.rs b/src/cfdp/pdu/mod.rs index 7ed249c..980607f 100644 --- a/src/cfdp/pdu/mod.rs +++ b/src/cfdp/pdu/mod.rs @@ -83,7 +83,10 @@ impl Display for PduError { "cfdp version missmatch, found {raw}, expected {CFDP_VERSION_2}" ) } - PduError::SourceDestIdLenMissmatch { src_id_len, dest_id_len }=> { + PduError::SourceDestIdLenMissmatch { + src_id_len, + dest_id_len, + } => { write!( f, "missmatch of PDU source length {src_id_len} and destination length {dest_id_len}" @@ -95,7 +98,7 @@ impl Display for PduError { PduError::FileSizeTooLarge(value) => { write!(f, "file size value {value} exceeds allowed 32 bit width") } - PduError::WrongDirectiveType { found, expected }=> { + PduError::WrongDirectiveType { found, expected } => { write!(f, "found directive type {found:?}, expected {expected:?}") } PduError::InvalidConditionCode(raw_code) => { @@ -222,7 +225,6 @@ impl CommonPduConfig { return Err(PduError::SourceDestIdLenMissmatch { src_id_len: source_id.size(), dest_id_len: dest_id.size(), - }); } if source_id.size() != 1 @@ -929,7 +931,11 @@ mod tests { CommonPduConfig::new_with_byte_fields(src_id, dest_id, transaction_seq_id); assert!(pdu_conf_res.is_err()); let error = pdu_conf_res.unwrap_err(); - if let PduError::SourceDestIdLenMissmatch { src_id_len, dest_id_len }= error { + if let PduError::SourceDestIdLenMissmatch { + src_id_len, + dest_id_len, + } = error + { assert_eq!(src_id_len, 1); assert_eq!(dest_id_len, 2); }