From 041959e546e6e72b24eb50986c425a924015e3f4 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 22:00:03 +0200 Subject: [PATCH] no error handling necessary here --- src/cfdp/pdu/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cfdp/pdu/mod.rs b/src/cfdp/pdu/mod.rs index 1321cd7..b18a058 100644 --- a/src/cfdp/pdu/mod.rs +++ b/src/cfdp/pdu/mod.rs @@ -222,7 +222,8 @@ impl CommonPduConfig { /// The defaults for the source ID, destination ID and the transaction sequence number is the /// [UnsignedByteFieldU8] with an intitial value of 0 - pub fn new_with_defaults() -> Result { + pub fn new_with_defaults() -> Self { + // new can not fail for these input parameters Self::new( UnsignedByteFieldU8::new(0), UnsignedByteFieldU8::new(0), @@ -231,7 +232,7 @@ impl CommonPduConfig { LargeFileFlag::Normal, CrcFlag::NoCrc, Direction::TowardsReceiver, - ) + ).unwrap() } pub fn source_id(&self) -> UnsignedByteField {