From 91948bdcf5aae9d372e9f49d117831cc6ee4b72c Mon Sep 17 00:00:00 2001 From: rhetenor Date: Sun, 30 Aug 2026 09:25:49 +0000 Subject: [PATCH] fix clippy warnings --- Cargo.toml | 3 +++ src/navigation/navigation.rs | 12 +++--------- src/peripherals/storage/flash_store.rs | 4 +--- src/views/flash_info_view.rs | 3 +-- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2e4a06e..b2f26eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,3 +83,6 @@ opt-level = 's' [features] default = [] wokwi = [] + +[lints.clippy] +manual_async_fn = "allow" diff --git a/src/navigation/navigation.rs b/src/navigation/navigation.rs index f05febf..583719f 100644 --- a/src/navigation/navigation.rs +++ b/src/navigation/navigation.rs @@ -67,7 +67,7 @@ pub async fn display_error( #[embassy_executor::task] pub async fn run( mut inputs: Inputs, - mut outputs: &'static Mutex, + outputs: &'static Mutex, peripherals: &'static Peripherals, navigation_state: &'static Mutex, ) { @@ -84,7 +84,7 @@ pub async fn run( .display(&mut outs, peripherals) .await { - display_error(error.to_string(), &navigation_state, &outputs, peripherals).await; + display_error(error.to_string(), navigation_state, outputs, peripherals).await; }; } @@ -142,13 +142,7 @@ pub async fn run( .display(&mut outs, peripherals) .await { - display_error( - error.to_string(), - &navigation_state, - &mut outputs, - peripherals, - ) - .await; + display_error(error.to_string(), navigation_state, outputs, peripherals).await; } } } diff --git a/src/peripherals/storage/flash_store.rs b/src/peripherals/storage/flash_store.rs index 1bbb564..031afad 100644 --- a/src/peripherals/storage/flash_store.rs +++ b/src/peripherals/storage/flash_store.rs @@ -21,9 +21,7 @@ impl Error for FlashStoreError {} impl Display for FlashStoreError { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - match self { - err => write!(f, "FlashStoreError:\n{:?}", err.0), - } + write!(f, "FlashStoreError:\n{:?}", self.0) } } diff --git a/src/views/flash_info_view.rs b/src/views/flash_info_view.rs index cb407b0..ee7b4f9 100644 --- a/src/views/flash_info_view.rs +++ b/src/views/flash_info_view.rs @@ -16,7 +16,6 @@ use embedded_graphics::{ pixelcolor::Rgb565, prelude::*, primitives::Rectangle, - text::Text, }; use alloc::format; @@ -39,7 +38,7 @@ impl Navigable for FlashInfoView { .primary_display .clear(Rgb565::BLACK) .map_err(PrimaryDisplayError::from)?; - let style = MonoTextStyle::new(&FONT_10X20, Rgb565::WHITE); + let _style = MonoTextStyle::new(&FONT_10X20, Rgb565::WHITE); let mut magic_bytes: [u8; MAGIC_REGION.size] = [0; MAGIC_REGION.size]; peripherals .store