1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 12:28:09 +00:00

style(core): fix (hopefully) the weird clippy warning about HOMESCREEN_TOIF_X_OFFSET

[no changelog]
This commit is contained in:
matejcik 2024-03-15 15:52:50 +01:00 committed by matejcik
parent 379737a9a5
commit 1c36c0927c
2 changed files with 1 additions and 7 deletions

View File

@ -159,12 +159,6 @@ jobs:
matrix: matrix:
model: [T2T1, T2B1] model: [T2T1, T2B1]
asan: ${{ fromJSON(needs.param.outputs.asan) }} 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: env:
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model == 'T2B1' && 'R' || matrix.model }} TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model == 'T2B1' && 'R' || matrix.model }}
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }} ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}

View File

@ -51,7 +51,7 @@ pub const HOMESCREEN_IMAGE_HEIGHT: i16 = HEIGHT;
pub const HOMESCREEN_TOIF_SIZE: i16 = 144; pub const HOMESCREEN_TOIF_SIZE: i16 = 144;
pub const HOMESCREEN_TOIF_Y_OFFSET: i16 = 27; pub const HOMESCREEN_TOIF_Y_OFFSET: i16 = 27;
pub const HOMESCREEN_TOIF_X_OFFSET: usize = 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 HOMESCREEN_MAX_ICON_SIZE: i16 = 20;
const NOTIFICATION_HEIGHT: i16 = 36; const NOTIFICATION_HEIGHT: i16 = 36;