diff --git a/satrs/src/pus/action.rs b/satrs/src/pus/action.rs index ee26330..75d5962 100644 --- a/satrs/src/pus/action.rs +++ b/satrs/src/pus/action.rs @@ -7,11 +7,9 @@ use crate::{ use satrs_shared::res_code::ResultU16; #[cfg(feature = "std")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] pub use std_mod::*; #[cfg(feature = "alloc")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] #[allow(unused_imports)] pub use alloc_mod::*; @@ -65,7 +63,6 @@ impl GenericActionReplyPus { } #[cfg(feature = "alloc")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] pub mod alloc_mod { use crate::{ action::ActionRequest, @@ -127,7 +124,6 @@ pub mod alloc_mod { } #[cfg(feature = "std")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] pub mod std_mod { use std::sync::mpsc; diff --git a/satrs/src/pus/event_man.rs b/satrs/src/pus/event_man.rs index 1a03f69..b8ddb6b 100644 --- a/satrs/src/pus/event_man.rs +++ b/satrs/src/pus/event_man.rs @@ -13,10 +13,8 @@ use crate::pus::verification::TcStateToken; use crate::pus::EcssTmSender; use crate::pus::EcssTmtcError; #[cfg(feature = "alloc")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] pub use alloc_mod::*; #[cfg(feature = "heapless")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "heapless")))] pub use heapless_mod::*; /// This trait allows the PUS event manager implementation to stay generic over various types @@ -44,7 +42,6 @@ pub mod heapless_mod { use crate::events::LargestEventRaw; use core::marker::PhantomData; - #[cfg_attr(doc_cfg, doc(cfg(feature = "heapless")))] // TODO: After a new version of heapless is released which uses hash32 version 0.3, try using // regular Event type again. #[derive(Default)] diff --git a/satrs/src/pus/mod.rs b/satrs/src/pus/mod.rs index 3e7cc90..78caa4d 100644 --- a/satrs/src/pus/mod.rs +++ b/satrs/src/pus/mod.rs @@ -368,7 +368,6 @@ pub mod alloc_mod { /// [DynClone] allows cloning the trait object as long as the boxed object implements /// [Clone]. #[cfg(feature = "alloc")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] pub trait EcssTmSenderExt: EcssTmSender + Downcast + DynClone { // Remove this once trait upcasting coercion has been implemented. // Tracking issue: https://github.com/rust-lang/rust/issues/65991 @@ -409,7 +408,6 @@ pub mod alloc_mod { /// [DynClone] allows cloning the trait object as long as the boxed object implements /// [Clone]. #[cfg(feature = "alloc")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] pub trait EcssTcSenderExt: EcssTcSender + Downcast + DynClone {} /// Blanket implementation for all types which implement [EcssTcSender] and are clonable. @@ -429,7 +427,6 @@ pub mod alloc_mod { /// [DynClone] allows cloning the trait object as long as the boxed object implements /// [Clone]. #[cfg(feature = "alloc")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] pub trait EcssTcReceiverExt: EcssTcReceiver + Downcast {} /// Blanket implementation for all types which implement [EcssTcReceiver] and are clonable. @@ -551,7 +548,6 @@ pub mod alloc_mod { > { #[cfg(feature = "std")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] pub fn new_from_now( active_request_map: ActiveRequestMap, fail_data_buf_size: usize, @@ -638,7 +634,6 @@ pub mod alloc_mod { /// Update the current time used for timeout checks based on the current OS time. #[cfg(feature = "std")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] pub fn update_time_from_now(&mut self) -> Result<(), std::time::SystemTimeError> { self.current_time = UnixTimestamp::from_now()?; Ok(()) @@ -653,7 +648,6 @@ pub mod alloc_mod { } #[cfg(feature = "std")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] pub mod std_mod { use crate::pool::{ PoolAddr, PoolError, PoolProvider, PoolProviderWithGuards, SharedStaticMemoryPool, diff --git a/satrs/src/pus/mode.rs b/satrs/src/pus/mode.rs index abb6b99..5ff78bf 100644 --- a/satrs/src/pus/mode.rs +++ b/satrs/src/pus/mode.rs @@ -26,11 +26,9 @@ pub enum Subservice { } #[cfg(feature = "alloc")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] pub mod alloc_mod {} #[cfg(feature = "alloc")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] pub mod std_mod {} #[cfg(test)] diff --git a/satrs/src/pus/scheduler.rs b/satrs/src/pus/scheduler.rs index 3ae8b58..1088142 100644 --- a/satrs/src/pus/scheduler.rs +++ b/satrs/src/pus/scheduler.rs @@ -423,7 +423,6 @@ pub mod alloc_mod { /// Like [Self::new], but sets the `init_current_time` parameter to the current system time. #[cfg(feature = "std")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] pub fn new_with_current_init_time(time_margin: Duration) -> Result { Ok(Self::new(UnixTime::now()?, time_margin)) } @@ -667,7 +666,6 @@ pub mod alloc_mod { } #[cfg(feature = "std")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] pub fn update_time_from_now(&mut self) -> Result<(), SystemTimeError> { self.current_time = UnixTime::now()?; Ok(()) diff --git a/satrs/src/pus/verification.rs b/satrs/src/pus/verification.rs index ffd6fe4..2f81e41 100644 --- a/satrs/src/pus/verification.rs +++ b/satrs/src/pus/verification.rs @@ -98,18 +98,11 @@ pub use crate::seq_count::SeqCountProviderSimple; pub use spacepackets::ecss::verification::*; #[cfg(feature = "alloc")] -#[cfg_attr(feature = "doc_cfg", doc(cfg(feature = "alloc")))] pub use alloc_mod::*; use crate::request::Apid; use crate::ComponentId; -/* -#[cfg(feature = "std")] -#[cfg_attr(feature = "doc_cfg", doc(cfg(feature = "std")))] -pub use std_mod::*; - */ - /// This is a request identifier as specified in 5.4.11.2 c. of the PUS standard. /// /// This field equivalent to the first two bytes of the CCSDS space packet header.