From 520ee1755173ad7c8039c505ff8cb2956202832d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 21 Sep 2023 18:44:33 +0200 Subject: [PATCH] some smaller fixes and tweaks --- satrs-core/src/cfdp/dest.rs | 2 +- satrs-core/src/cfdp/source.rs | 1 + satrs-core/src/executable.rs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/satrs-core/src/cfdp/dest.rs b/satrs-core/src/cfdp/dest.rs index d7ea7cc..b66365a 100644 --- a/satrs-core/src/cfdp/dest.rs +++ b/satrs-core/src/cfdp/dest.rs @@ -319,6 +319,7 @@ impl DestinationHandler { Ok(()) } + #[allow(clippy::needless_if)] pub fn handle_eof_pdu(&mut self, raw_packet: &[u8]) -> Result<(), DestError> { if self.state == State::Idle || self.step != TransactionStep::ReceivingFileDataPdus { return Err(DestError::WrongStateForFileDataAndEof); @@ -367,7 +368,6 @@ impl DestinationHandler { } fn fsm_nacked(&mut self, cfdp_user: &mut impl CfdpUser) -> Result<(), DestError> { - if self.step == TransactionStep::Idle {} if self.step == TransactionStep::TransactionStart { self.transaction_start(cfdp_user)?; } diff --git a/satrs-core/src/cfdp/source.rs b/satrs-core/src/cfdp/source.rs index 146f5be..433f4d2 100644 --- a/satrs-core/src/cfdp/source.rs +++ b/satrs-core/src/cfdp/source.rs @@ -1,3 +1,4 @@ +#![allow(dead_code)] use spacepackets::util::UnsignedByteField; pub struct SourceHandler { diff --git a/satrs-core/src/executable.rs b/satrs-core/src/executable.rs index 440f8ee..77ed178 100644 --- a/satrs-core/src/executable.rs +++ b/satrs-core/src/executable.rs @@ -29,7 +29,7 @@ pub trait Executable: Send { fn periodic_op(&mut self, op_code: i32) -> Result; } -/// This function allows executing one task which implements the [Executable][Executable] trait +/// This function allows executing one task which implements the [Executable] trait /// /// # Arguments /// @@ -78,7 +78,7 @@ pub fn exec_sched_single< } /// This function allows executing multiple tasks as long as the tasks implement the -/// [Executable][Executable] trait +/// [Executable] trait /// /// # Arguments ///