From 7380a3b24ce44fb3fef19316d70369beaa0665ef Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 26 Feb 2024 10:46:27 +0100 Subject: [PATCH] some doc improvements --- satrs/src/cfdp/filestore.rs | 5 ++--- satrs/src/event_man.rs | 5 +---- satrs/src/pus/verification.rs | 18 ++++++++---------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/satrs/src/cfdp/filestore.rs b/satrs/src/cfdp/filestore.rs index 48ebd88..528d1b8 100644 --- a/satrs/src/cfdp/filestore.rs +++ b/satrs/src/cfdp/filestore.rs @@ -7,7 +7,7 @@ use spacepackets::ByteConversionError; use std::error::Error; use std::path::Path; #[cfg(feature = "std")] -pub use stdmod::*; +pub use std_mod::*; pub const CRC_32: Crc = Crc::::new(&CRC_32_CKSUM); @@ -148,12 +148,11 @@ pub trait VirtualFilestore { } #[cfg(feature = "std")] -pub mod stdmod { +pub mod std_mod { use super::*; use std::{ fs::{self, File, OpenOptions}, io::{BufReader, Read, Seek, SeekFrom, Write}, - path::Path, }; #[derive(Default)] diff --git a/satrs/src/event_man.rs b/satrs/src/event_man.rs index 3441188..304f9a1 100644 --- a/satrs/src/event_man.rs +++ b/satrs/src/event_man.rs @@ -429,10 +429,7 @@ pub mod alloc_mod { #[cfg(feature = "std")] pub mod std_mod { use super::*; - use crate::event_man::{EventReceiveProvider, EventWithAuxData}; - use crate::events::{EventU16, EventU32, GenericEvent}; - use crate::params::Params; - use std::sync::mpsc::{self}; + use std::sync::mpsc; pub struct MpscEventReceiver { mpsc_receiver: mpsc::Receiver<(Event, Option)>, diff --git a/satrs/src/pus/verification.rs b/satrs/src/pus/verification.rs index 34ccc4d..89ce9b9 100644 --- a/satrs/src/pus/verification.rs +++ b/satrs/src/pus/verification.rs @@ -952,13 +952,11 @@ impl VerificationReporterCore { #[cfg(feature = "alloc")] pub mod alloc_mod { use super::*; - use crate::pus::{TmAsVecSenderWithId, TmInSharedPoolSenderWithId}; - use crate::seq_count::SequenceCountProvider; - use alloc::boxed::Box; - use alloc::vec; - use alloc::vec::Vec; + use crate::{ + pus::{TmAsVecSenderWithId, TmInSharedPoolSenderWithId}, + seq_count::SequenceCountProvider, + }; use core::cell::RefCell; - use spacepackets::ecss::tc::IsPusTelecommand; #[derive(Clone)] pub struct VerificationReporterCfg { @@ -993,9 +991,9 @@ pub mod alloc_mod { /// TM funnel. This helper will always set those fields to 0. #[derive(Clone)] pub struct VerificationReporter { - source_data_buf: RefCell>, - pub seq_count_provider: Option + Send>>, - pub msg_count_provider: Option + Send>>, + source_data_buf: RefCell>, + pub seq_count_provider: Option + Send>>, + pub msg_count_provider: Option + Send>>, pub reporter: VerificationReporterCore, } @@ -1003,7 +1001,7 @@ pub mod alloc_mod { pub fn new(cfg: &VerificationReporterCfg) -> Self { let reporter = VerificationReporterCore::new(cfg.apid).unwrap(); Self { - source_data_buf: RefCell::new(vec![ + source_data_buf: RefCell::new(alloc::vec![ 0; RequestId::SIZE_AS_BYTES + cfg.step_field_width