From 1c36c0927c33fd05b4eff4b3a020940e33074b54 Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 15 Mar 2024 15:52:50 +0100 Subject: [PATCH] style(core): fix (hopefully) the weird clippy warning about HOMESCREEN_TOIF_X_OFFSET [no changelog] --- .github/workflows/core.yml | 6 ------ .../rust/src/ui/model_tt/component/homescreen/render.rs | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index cf2f3f22ddb..2ff9ab2cf36 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -159,12 +159,6 @@ jobs: matrix: model: [T2T1, T2B1] asan: ${{ fromJSON(needs.param.outputs.asan) }} - # T2B1 fails due to rust clippy error which is hard to reproduce, see discussion here: - # https://github.com/trezor/trezor-firmware/pull/2196 - # The problem might be in conflicting versions of clippy, let's see if this helps: - # https://github.com/trezor/trezor-firmware/issues/3337 - exclude: - - model: T2B1 env: TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model == 'T2B1' && 'R' || matrix.model }} ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }} diff --git a/core/embed/rust/src/ui/model_tt/component/homescreen/render.rs b/core/embed/rust/src/ui/model_tt/component/homescreen/render.rs index a008d401502..458f5aa3554 100644 --- a/core/embed/rust/src/ui/model_tt/component/homescreen/render.rs +++ b/core/embed/rust/src/ui/model_tt/component/homescreen/render.rs @@ -51,7 +51,7 @@ pub const HOMESCREEN_IMAGE_HEIGHT: i16 = HEIGHT; pub const HOMESCREEN_TOIF_SIZE: i16 = 144; pub const HOMESCREEN_TOIF_Y_OFFSET: i16 = 27; pub const HOMESCREEN_TOIF_X_OFFSET: usize = - ((WIDTH.saturating_sub(HOMESCREEN_TOIF_SIZE)) / 2) as usize; + ((WIDTH as usize).saturating_sub(HOMESCREEN_TOIF_SIZE as usize)) / 2; const HOMESCREEN_MAX_ICON_SIZE: i16 = 20; const NOTIFICATION_HEIGHT: i16 = 36;