fix clippy warnings #57
@@ -83,3 +83,6 @@ opt-level = 's'
|
||||
[features]
|
||||
default = []
|
||||
wokwi = []
|
||||
|
||||
[lints.clippy]
|
||||
manual_async_fn = "allow"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user