From edb647088fa9b2140ec0aa8924f6de4d50ed8410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Sun, 15 Oct 2023 18:56:13 +0200 Subject: [PATCH] Fix some clippy warnings --- src/states/measure.rs | 2 +- src/states/menu/battery_info.rs | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/states/measure.rs b/src/states/measure.rs index 7a82d47f..dcf84444 100644 --- a/src/states/measure.rs +++ b/src/states/measure.rs @@ -116,7 +116,7 @@ pub async fn measure(board: &mut Board) -> AppState { } unsafe { - let frontend = core::ptr::read(&mut board.frontend); + let frontend = core::ptr::read(&board.frontend); let (next_state, frontend) = measure_impl(&mut board.inner, frontend, &mut ecg, ecg_buffer).await; diff --git a/src/states/menu/battery_info.rs b/src/states/menu/battery_info.rs index fecaf2fc..4c7e0783 100644 --- a/src/states/menu/battery_info.rs +++ b/src/states/menu/battery_info.rs @@ -48,11 +48,7 @@ impl MenuScreen for BatteryInfoMenu { } if let Ok(current) = sensor.fg.read_current().await { - list_item(uformat!( - 20, - "Current {}mA", - LeftPad(10, current as i32 / 1000) - )); + list_item(uformat!(20, "Current {}mA", LeftPad(10, current / 1000))); } if let Ok(cap) = sensor.fg.read_design_capacity().await {