clippy fixes

This commit was merged in pull request #52.
This commit is contained in:
2026-08-29 23:40:22 +02:00
parent e2853bc9ab
commit aa7fc94068
3 changed files with 39 additions and 45 deletions
+16 -19
View File
@@ -16,7 +16,6 @@ use embedded_graphics::{
pixelcolor::Rgb565,
prelude::*,
primitives::Rectangle,
text::Text,
};
use alloc::format;
@@ -35,7 +34,7 @@ impl Navigable for FlashInfoView {
peripherals: &Peripherals,
) -> impl core::future::Future<Output = Result<(), Box<dyn error::Error>>> + Send {
async move {
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
@@ -83,23 +82,21 @@ Card Count: {}\n
fn handle_input(&self, input: Action) -> impl core::future::Future<Output = NewState> + Send {
async move {
let Action::Button(input) = input else {
// Skip timer inputs
return NewState {
view: View::FlashInfo(self.clone()),
replace_view: true,
redraw: false,
};
};
let new_menu = match input {
_ => View::FlashInfo(self.clone()),
};
NewState {
replace_view: matches!(new_menu, View::FlashInfo(_)),
view: new_menu,
redraw: true,
let new_menu = View::FlashInfo(self.clone());
match input {
Action::Button(_) => NewState {
replace_view: matches!(new_menu, View::FlashInfo(_)),
view: new_menu,
redraw: true,
},
Action::Timer => {
// Skip timer inputs
NewState {
view: new_menu,
replace_view: true,
redraw: false,
}
}
}
}
}