From 73b11d0ae2233d72a6fadfa5945eb4ec193dd1e2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 27 Nov 2025 17:34:51 +0100 Subject: [PATCH] more precise error handling for CCSDS support --- justfile | 2 +- src/lib.rs | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/justfile b/justfile index 4ce05c0..5d773d0 100644 --- a/justfile +++ b/justfile @@ -24,7 +24,7 @@ build: cargo build --all-features docs: - RUSTDOCFLAGS="--cfg docsrs -Z unstable-options --generate-link-to-definition" cargo +nightly doc --all-features + RUSTDOCFLAGS="--cfg docsrs -Z unstable-options --generate-link-to-definition" cargo +nightly doc --all-features --no-deps docs-html: RUSTDOCFLAGS="--cfg docsrs -Z unstable-options --generate-link-to-definition" cargo +nightly doc --all-features --open diff --git a/src/lib.rs b/src/lib.rs index c840c0f..135909c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1284,7 +1284,7 @@ impl<'app_data> CcsdsPacketCreator<'app_data> { packet_type: PacketType, packet_data: &'app_data [u8], checksum: Option, - ) -> Result { + ) -> Result { let common = CcsdsPacketCreatorCommon::new(sp_header, packet_type, packet_data.len(), checksum)?; Ok(Self { @@ -1298,7 +1298,7 @@ impl<'app_data> CcsdsPacketCreator<'app_data> { sp_header: SpHeader, packet_type: PacketType, app_data: &'app_data [u8], - ) -> Result { + ) -> Result { Self::new( sp_header, packet_type, @@ -1311,7 +1311,7 @@ impl<'app_data> CcsdsPacketCreator<'app_data> { pub fn new_tm_with_checksum( sp_header: SpHeader, app_data: &'app_data [u8], - ) -> Result { + ) -> Result { Self::new( sp_header, PacketType::Tm, @@ -1324,7 +1324,7 @@ impl<'app_data> CcsdsPacketCreator<'app_data> { pub fn new_tc_with_checksum( sp_header: SpHeader, app_data: &'app_data [u8], - ) -> Result { + ) -> Result { Self::new( sp_header, PacketType::Tc, @@ -1420,7 +1420,7 @@ impl CcsdsPacketCreatorOwned { packet_type: PacketType, user_data: &[u8], checksum: Option, - ) -> Result { + ) -> Result { let common = CcsdsPacketCreatorCommon::new(sp_header, packet_type, user_data.len(), checksum)?; Ok(Self { @@ -1434,7 +1434,7 @@ impl CcsdsPacketCreatorOwned { sp_header: SpHeader, packet_type: PacketType, user_data: &[u8], - ) -> Result { + ) -> Result { Self::new( sp_header, packet_type, @@ -1447,7 +1447,7 @@ impl CcsdsPacketCreatorOwned { pub fn new_tm_with_checksum( sp_header: SpHeader, user_data: &[u8], - ) -> Result { + ) -> Result { Self::new( sp_header, PacketType::Tm, @@ -1460,7 +1460,7 @@ impl CcsdsPacketCreatorOwned { pub fn new_tc_with_checksum( sp_header: SpHeader, user_data: &[u8], - ) -> Result { + ) -> Result { Self::new( sp_header, PacketType::Tc,