some smaller fixes and tweaks
All checks were successful
Rust/sat-rs/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-09-21 18:44:33 +02:00
parent ffcab9592e
commit 520ee17551
Signed by: muellerr
GPG Key ID: A649FB78196E3849
3 changed files with 4 additions and 3 deletions

View File

@ -319,6 +319,7 @@ impl DestinationHandler {
Ok(()) Ok(())
} }
#[allow(clippy::needless_if)]
pub fn handle_eof_pdu(&mut self, raw_packet: &[u8]) -> Result<(), DestError> { pub fn handle_eof_pdu(&mut self, raw_packet: &[u8]) -> Result<(), DestError> {
if self.state == State::Idle || self.step != TransactionStep::ReceivingFileDataPdus { if self.state == State::Idle || self.step != TransactionStep::ReceivingFileDataPdus {
return Err(DestError::WrongStateForFileDataAndEof); return Err(DestError::WrongStateForFileDataAndEof);
@ -367,7 +368,6 @@ impl DestinationHandler {
} }
fn fsm_nacked(&mut self, cfdp_user: &mut impl CfdpUser) -> Result<(), DestError> { fn fsm_nacked(&mut self, cfdp_user: &mut impl CfdpUser) -> Result<(), DestError> {
if self.step == TransactionStep::Idle {}
if self.step == TransactionStep::TransactionStart { if self.step == TransactionStep::TransactionStart {
self.transaction_start(cfdp_user)?; self.transaction_start(cfdp_user)?;
} }

View File

@ -1,3 +1,4 @@
#![allow(dead_code)]
use spacepackets::util::UnsignedByteField; use spacepackets::util::UnsignedByteField;
pub struct SourceHandler { pub struct SourceHandler {

View File

@ -29,7 +29,7 @@ pub trait Executable: Send {
fn periodic_op(&mut self, op_code: i32) -> Result<OpResult, Self::Error>; fn periodic_op(&mut self, op_code: i32) -> Result<OpResult, Self::Error>;
} }
/// This function allows executing one task which implements the [Executable][Executable] trait /// This function allows executing one task which implements the [Executable] trait
/// ///
/// # Arguments /// # Arguments
/// ///
@ -78,7 +78,7 @@ pub fn exec_sched_single<
} }
/// This function allows executing multiple tasks as long as the tasks implement the /// This function allows executing multiple tasks as long as the tasks implement the
/// [Executable][Executable] trait /// [Executable] trait
/// ///
/// # Arguments /// # Arguments
/// ///