mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-26 18:02:35 +00:00
fix(core): warnings in device build
[no changelog]
This commit is contained in:
parent
0081788d48
commit
d65b4f0e86
@ -247,7 +247,7 @@ impl TextLayout {
|
|||||||
text: &str,
|
text: &str,
|
||||||
target: &mut impl Renderer<'s>,
|
target: &mut impl Renderer<'s>,
|
||||||
alpha: u8,
|
alpha: u8,
|
||||||
must_fit: bool,
|
_must_fit: bool,
|
||||||
) -> LayoutFit {
|
) -> LayoutFit {
|
||||||
let fit = self.layout_text(
|
let fit = self.layout_text(
|
||||||
text,
|
text,
|
||||||
@ -256,7 +256,7 @@ impl TextLayout {
|
|||||||
);
|
);
|
||||||
|
|
||||||
#[cfg(feature = "ui_debug")]
|
#[cfg(feature = "ui_debug")]
|
||||||
if must_fit && matches!(fit, LayoutFit::OutOfBounds { .. }) {
|
if _must_fit && matches!(fit, LayoutFit::OutOfBounds { .. }) {
|
||||||
target.raise_overflow_exception();
|
target.raise_overflow_exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,7 +314,10 @@ impl Layout<Result<Obj, Error>> for SwipeFlow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn paint(&mut self) -> Result<(), Error> {
|
fn paint(&mut self) -> Result<(), Error> {
|
||||||
|
#[cfg(feature = "ui_debug")]
|
||||||
let mut overflow: bool = false;
|
let mut overflow: bool = false;
|
||||||
|
#[cfg(not(feature = "ui_debug"))]
|
||||||
|
let overflow: bool = false;
|
||||||
render_on_display(None, Some(Color::black()), |target| {
|
render_on_display(None, Some(Color::black()), |target| {
|
||||||
self.render_state(self.state.index(), target);
|
self.render_state(self.state.index(), target);
|
||||||
#[cfg(feature = "ui_debug")]
|
#[cfg(feature = "ui_debug")]
|
||||||
|
@ -44,11 +44,14 @@ use crate::{
|
|||||||
},
|
},
|
||||||
display::{self, Color},
|
display::{self, Color},
|
||||||
event::USBEvent,
|
event::USBEvent,
|
||||||
shape::{render_on_display, Renderer},
|
shape::render_on_display,
|
||||||
CommonUI, ModelUI,
|
CommonUI, ModelUI,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(feature = "ui_debug")]
|
||||||
|
use crate::ui::shape::Renderer;
|
||||||
|
|
||||||
impl AttachType {
|
impl AttachType {
|
||||||
fn to_obj(self) -> Obj {
|
fn to_obj(self) -> Obj {
|
||||||
match self {
|
match self {
|
||||||
@ -147,6 +150,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn paint(&mut self) -> Result<(), Error> {
|
fn paint(&mut self) -> Result<(), Error> {
|
||||||
|
#[cfg(feature = "ui_debug")]
|
||||||
let mut overflow: bool = false;
|
let mut overflow: bool = false;
|
||||||
render_on_display(None, Some(Color::black()), |target| {
|
render_on_display(None, Some(Color::black()), |target| {
|
||||||
self.inner.render(target);
|
self.inner.render(target);
|
||||||
|
Loading…
Reference in New Issue
Block a user