fix clippy warnings #57

Merged
rhetenor merged 6 commits from rhetenor/errorview-show-error-in-nfc-module AGit into main 2026-08-30 11:26:49 +02:00
4 changed files with 8 additions and 14 deletions
Showing only changes of commit 91948bdcf5 - Show all commits
+3
View File
@@ -83,3 +83,6 @@ opt-level = 's'
[features]
default = []
wokwi = []
[lints.clippy]
manual_async_fn = "allow"
+3 -9
View File
@@ -67,7 +67,7 @@ pub async fn display_error(
#[embassy_executor::task]
pub async fn run(
mut inputs: Inputs,
mut outputs: &'static Mutex<Outputs>,
outputs: &'static Mutex<Outputs>,
peripherals: &'static Peripherals,
navigation_state: &'static Mutex<NavigationState>,
) {
@@ -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;
}
}
}
+1 -3
View File
@@ -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)
}
}
+1 -2
View File
@@ -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