mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 17:38:39 +00:00
refactor(core): remove lockscreen lifetimes
[no changelog]
This commit is contained in:
parent
e03d404dca
commit
51c1ff728d
@ -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<Rgb565Canvas<'static>>,
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
|
@ -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<Obj, Error> {
|
||||
match msg {
|
||||
HomescreenMsg::Dismissed => Ok(CANCELLED.as_obj()),
|
||||
|
Loading…
Reference in New Issue
Block a user