1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-06-26 09:52:34 +00:00

fix(core): warnings in device build

[no changelog]
This commit is contained in:
Ioan Bizău 2025-06-03 12:41:52 +02:00 committed by Ioan Bizău
parent 0081788d48
commit d65b4f0e86
3 changed files with 10 additions and 3 deletions

View File

@ -247,7 +247,7 @@ impl TextLayout {
text: &str,
target: &mut impl Renderer<'s>,
alpha: u8,
must_fit: bool,
_must_fit: bool,
) -> LayoutFit {
let fit = self.layout_text(
text,
@ -256,7 +256,7 @@ impl TextLayout {
);
#[cfg(feature = "ui_debug")]
if must_fit && matches!(fit, LayoutFit::OutOfBounds { .. }) {
if _must_fit && matches!(fit, LayoutFit::OutOfBounds { .. }) {
target.raise_overflow_exception();
}

View File

@ -314,7 +314,10 @@ impl Layout<Result<Obj, Error>> for SwipeFlow {
}
fn paint(&mut self) -> Result<(), Error> {
#[cfg(feature = "ui_debug")]
let mut overflow: bool = false;
#[cfg(not(feature = "ui_debug"))]
let overflow: bool = false;
render_on_display(None, Some(Color::black()), |target| {
self.render_state(self.state.index(), target);
#[cfg(feature = "ui_debug")]

View File

@ -44,11 +44,14 @@ use crate::{
},
display::{self, Color},
event::USBEvent,
shape::{render_on_display, Renderer},
shape::render_on_display,
CommonUI, ModelUI,
},
};
#[cfg(feature = "ui_debug")]
use crate::ui::shape::Renderer;
impl AttachType {
fn to_obj(self) -> Obj {
match self {
@ -147,6 +150,7 @@ where
}
fn paint(&mut self) -> Result<(), Error> {
#[cfg(feature = "ui_debug")]
let mut overflow: bool = false;
render_on_display(None, Some(Color::black()), |target| {
self.inner.render(target);