From edcd5491f11619bb5c419a7df8fe46744af0d1c7 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 4 Nov 2024 13:35:26 +0100 Subject: [PATCH] clippy fixes --- satrs-example/src/acs/mgm.rs | 1 + satrs-example/src/eps/mod.rs | 2 ++ satrs-example/src/pus/mod.rs | 2 ++ satrs-example/src/requests.rs | 1 + satrs-mib/src/lib.rs | 2 -- satrs-minisim/src/acs.rs | 1 + 6 files changed, 7 insertions(+), 2 deletions(-) diff --git a/satrs-example/src/acs/mgm.rs b/satrs-example/src/acs/mgm.rs index b75e126..e3ab71f 100644 --- a/satrs-example/src/acs/mgm.rs +++ b/satrs-example/src/acs/mgm.rs @@ -132,6 +132,7 @@ pub struct MgmData { pub struct MpscModeLeafInterface { pub request_rx: mpsc::Receiver>, pub reply_to_pus_tx: mpsc::Sender>, + #[allow(dead_code)] pub reply_to_parent_tx: mpsc::SyncSender>, } diff --git a/satrs-example/src/eps/mod.rs b/satrs-example/src/eps/mod.rs index 351cf76..333edb0 100644 --- a/satrs-example/src/eps/mod.rs +++ b/satrs-example/src/eps/mod.rs @@ -88,6 +88,7 @@ impl PowerSwitcherCommandSender for PowerSwitchHelper { } } +#[allow(dead_code)] #[derive(new)] pub struct SwitchRequestInfo { pub requestor_info: MessageMetadata, @@ -99,6 +100,7 @@ pub struct SwitchRequestInfo { pub struct TestSwitchHelper { pub switch_requests: RefCell>, pub switch_info_requests: RefCell>, + #[allow(dead_code)] pub switch_delay_request_count: u32, pub next_switch_delay: Duration, pub switch_map: RefCell, diff --git a/satrs-example/src/pus/mod.rs b/satrs-example/src/pus/mod.rs index b2e7f8a..3ce5533 100644 --- a/satrs-example/src/pus/mod.rs +++ b/satrs-example/src/pus/mod.rs @@ -44,11 +44,13 @@ pub struct PusTcMpscRouter { pub event_tc_sender: Sender, pub sched_tc_sender: Sender, pub hk_tc_sender: Sender, + #[allow(dead_code)] pub action_tc_sender: Sender, pub mode_tc_sender: Sender, } pub struct PusTcDistributor { + #[allow(dead_code)] pub id: ComponentId, pub tm_sender: TmSender, pub verif_reporter: VerificationReporter, diff --git a/satrs-example/src/requests.rs b/satrs-example/src/requests.rs index 316a486..1db6ac1 100644 --- a/satrs-example/src/requests.rs +++ b/satrs-example/src/requests.rs @@ -26,6 +26,7 @@ pub enum CompositeRequest { #[derive(Clone)] pub struct GenericRequestRouter { + #[allow(dead_code)] pub id: ComponentId, // All messages which do not have a dedicated queue. pub composite_router_map: diff --git a/satrs-mib/src/lib.rs b/satrs-mib/src/lib.rs index d2ba843..989113f 100644 --- a/satrs-mib/src/lib.rs +++ b/satrs-mib/src/lib.rs @@ -1,6 +1,4 @@ #![no_std] -#[cfg(feature = "alloc")] -extern crate alloc; #[cfg(any(feature = "std", test))] extern crate std; diff --git a/satrs-minisim/src/acs.rs b/satrs-minisim/src/acs.rs index 2403487..af6566e 100644 --- a/satrs-minisim/src/acs.rs +++ b/satrs-minisim/src/acs.rs @@ -31,6 +31,7 @@ const PHASE_Z: f32 = 0.2; /// might still be possible and is probably sufficient for many OBSW needs. pub struct MagnetometerModel { pub switch_state: SwitchStateBinary, + #[allow(dead_code)] pub periodicity: Duration, pub external_mag_field: Option, pub reply_sender: mpsc::Sender,