From 51c1ff728d7b8b32e215a21246584d987340d4f4 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Wed, 29 May 2024 14:23:04 +0200 Subject: [PATCH] refactor(core): remove lockscreen lifetimes [no changelog] --- .../src/ui/model_mercury/component/homescreen.rs | 12 ++++++------ core/embed/rust/src/ui/model_mercury/layout.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/embed/rust/src/ui/model_mercury/component/homescreen.rs b/core/embed/rust/src/ui/model_mercury/component/homescreen.rs index 4cad5d68ed..ea4bbe6710 100644 --- a/core/embed/rust/src/ui/model_mercury/component/homescreen.rs +++ b/core/embed/rust/src/ui/model_mercury/component/homescreen.rs @@ -291,17 +291,17 @@ impl LockscreenAnim { } } -pub struct Lockscreen<'a> { +pub struct Lockscreen { anim: LockscreenAnim, - label: TString<'a>, + label: TString<'static>, image: BinaryData<'static>, bootscreen: bool, coinjoin_authorized: bool, bg_image: ImageBuffer>, } -impl<'a> Lockscreen<'a> { - pub fn new(label: TString<'a>, bootscreen: bool, coinjoin_authorized: bool) -> Self { +impl Lockscreen { + pub fn new(label: TString<'static>, bootscreen: bool, coinjoin_authorized: bool) -> Self { let image = get_homescreen_image(); let mut buf = unwrap!(ImageBuffer::new(AREA.size()), "no image buf"); @@ -320,7 +320,7 @@ impl<'a> Lockscreen<'a> { } } -impl Component for Lockscreen<'_> { +impl Component for Lockscreen { type Msg = HomescreenMsg; fn place(&mut self, bounds: Rect) -> Rect { @@ -468,7 +468,7 @@ fn get_homescreen_image() -> BinaryData<'static> { } #[cfg(feature = "ui_debug")] -impl crate::trace::Trace for Lockscreen<'_> { +impl crate::trace::Trace for Lockscreen { fn trace(&self, t: &mut dyn crate::trace::Tracer) { t.component("Lockscreen"); } diff --git a/core/embed/rust/src/ui/model_mercury/layout.rs b/core/embed/rust/src/ui/model_mercury/layout.rs index a7c7f559ca..76e1f3e246 100644 --- a/core/embed/rust/src/ui/model_mercury/layout.rs +++ b/core/embed/rust/src/ui/model_mercury/layout.rs @@ -271,7 +271,7 @@ impl ComponentMsgObj for Homescreen { } } -impl ComponentMsgObj for Lockscreen<'_> { +impl ComponentMsgObj for Lockscreen { fn msg_try_into_obj(&self, msg: Self::Msg) -> Result { match msg { HomescreenMsg::Dismissed => Ok(CANCELLED.as_obj()),