refactor(core/rust): use more Self

[no changelog]
pull/3626/head
Martin Milata 2 months ago
parent 906c00e4e5
commit 5c5433ada2

@ -268,7 +268,7 @@ impl UIFeaturesBootloader for ModelTRFeatures {
} }
fn screen_wipe_progress(progress: u16, initialize: bool) { fn screen_wipe_progress(progress: u16, initialize: bool) {
ModelTRFeatures::screen_progress( Self::screen_progress(
"Resetting", "Resetting",
"Trezor", "Trezor",
progress, progress,
@ -280,7 +280,7 @@ impl UIFeaturesBootloader for ModelTRFeatures {
} }
fn screen_install_progress(progress: u16, initialize: bool, _initial_setup: bool) { fn screen_install_progress(progress: u16, initialize: bool, _initial_setup: bool) {
ModelTRFeatures::screen_progress( Self::screen_progress(
"Installing", "Installing",
"firmware", "firmware",
progress, progress,

@ -52,7 +52,7 @@ impl ModelTTFeatures {
icon: Option<(Icon, Color)>, icon: Option<(Icon, Color)>,
) { ) {
if initialize { if initialize {
ModelTTFeatures::fadeout(); Self::fadeout();
display::rect_fill(SCREEN, bg_color); display::rect_fill(SCREEN, bg_color);
} }
@ -66,7 +66,7 @@ impl ModelTTFeatures {
display::loader(progress, -20, fg_color, bg_color, icon); display::loader(progress, -20, fg_color, bg_color, icon);
display::refresh(); display::refresh();
if initialize { if initialize {
ModelTTFeatures::fadein(); Self::fadein();
} }
} }
@ -122,9 +122,9 @@ impl UIFeaturesBootloader for ModelTTFeatures {
} }
if initial_setup { if initial_setup {
ModelTTFeatures::screen_install_success_initial(reboot_msg.as_str(), complete_draw) Self::screen_install_success_initial(reboot_msg.as_str(), complete_draw)
} else { } else {
ModelTTFeatures::screen_install_success_bld(reboot_msg.as_str(), complete_draw) Self::screen_install_success_bld(reboot_msg.as_str(), complete_draw)
} }
display::refresh(); display::refresh();
} }
@ -247,7 +247,7 @@ impl UIFeaturesBootloader for ModelTTFeatures {
fn screen_boot_stage_1(fading: bool) { fn screen_boot_stage_1(fading: bool) {
if fading { if fading {
ModelTTFeatures::fadeout(); Self::fadeout();
} }
display::rect_fill(SCREEN, BLACK); display::rect_fill(SCREEN, BLACK);
@ -256,7 +256,7 @@ impl UIFeaturesBootloader for ModelTTFeatures {
show(&mut frame, false); show(&mut frame, false);
if fading { if fading {
ModelTTFeatures::fadein(); Self::fadein();
} else { } else {
display::set_backlight(BACKLIGHT_NORMAL); display::set_backlight(BACKLIGHT_NORMAL);
} }
@ -264,7 +264,7 @@ impl UIFeaturesBootloader for ModelTTFeatures {
} }
fn screen_wipe_progress(progress: u16, initialize: bool) { fn screen_wipe_progress(progress: u16, initialize: bool) {
ModelTTFeatures::screen_progress( Self::screen_progress(
"Resetting Trezor", "Resetting Trezor",
progress, progress,
initialize, initialize,
@ -278,7 +278,7 @@ impl UIFeaturesBootloader for ModelTTFeatures {
let bg_color = if initial_setup { WELCOME_COLOR } else { BLD_BG }; let bg_color = if initial_setup { WELCOME_COLOR } else { BLD_BG };
let fg_color = if initial_setup { FG } else { BLD_FG }; let fg_color = if initial_setup { FG } else { BLD_FG };
ModelTTFeatures::screen_progress( Self::screen_progress(
"Installing firmware", "Installing firmware",
progress, progress,
initialize, initialize,

Loading…
Cancel
Save