1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

chore(core/rust): fix compilation warnings

[no changelog]
This commit is contained in:
tychovrahe 2023-06-23 15:20:01 +02:00 committed by TychoVrahe
parent b051a7fd66
commit 4cc6413a46
3 changed files with 5 additions and 4 deletions

View File

@ -269,10 +269,10 @@ impl Icon {
/// Create a named icon.
/// The name is only stored in debug builds.
pub const fn debug_named(data: &'static [u8], name: &'static str) -> Self {
pub const fn debug_named(data: &'static [u8], _name: &'static str) -> Self {
Self {
#[cfg(feature = "ui_debug")]
name,
name: _name,
..Self::new(data)
}
}

View File

@ -17,6 +17,7 @@ macro_rules! build_string {
}
/// Transforms integer into string slice. For example for printing.
#[allow(unused_macros)] // not used in TT UI
macro_rules! inttostr {
($int:expr) => {{
heapless::String::<10>::from($int).as_str()

View File

@ -1,6 +1,5 @@
use crate::ui::{
component::{Component, Event, EventCtx, Never},
constant::MODEL_NAME,
geometry::{Alignment2D, Offset, Rect},
model_tt::theme,
};
@ -12,7 +11,7 @@ const ICON_TOP_MARGIN: i16 = 48;
#[cfg(not(feature = "bootloader"))]
const MODEL_NAME_FONT: display::Font = display::Font::DEMIBOLD;
#[cfg(not(feature = "bootloader"))]
use crate::ui::display;
use crate::ui::{constant::MODEL_NAME, display};
pub struct WelcomeScreen {
area: Rect,
@ -65,6 +64,7 @@ impl Component for WelcomeScreen {
impl crate::trace::Trace for WelcomeScreen {
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
t.component("WelcomeScreen");
#[cfg(not(feature = "bootloader"))]
t.string("model", MODEL_NAME);
}
}