mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 03:50:58 +00:00
chore(core/rust): add missing traces to components
[no changelog]
This commit is contained in:
parent
9234db79e9
commit
a8d57bf2c4
@ -144,3 +144,17 @@ pub fn paint_overlapping(components: &mut [&mut dyn PaintOverlapping]) {
|
|||||||
component.paint_overlapping()
|
component.paint_overlapping()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DEBUG-ONLY SECTION BELOW
|
||||||
|
|
||||||
|
#[cfg(feature = "ui_debug")]
|
||||||
|
impl<T> crate::trace::Trace for Maybe<T>
|
||||||
|
where
|
||||||
|
T: Component + crate::trace::Trace,
|
||||||
|
{
|
||||||
|
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
||||||
|
t.component("Maybe");
|
||||||
|
t.child("inner", &self.inner);
|
||||||
|
t.bool("visible", self.visible);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -103,3 +103,13 @@ impl<const L: usize> TextBox<L> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DEBUG-ONLY SECTION BELOW
|
||||||
|
|
||||||
|
#[cfg(feature = "ui_debug")]
|
||||||
|
impl<const L: usize> crate::trace::Trace for TextBox<L> {
|
||||||
|
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
||||||
|
t.component("TextBox");
|
||||||
|
t.string("text", &self.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -232,10 +232,7 @@ where
|
|||||||
T: StringType + Clone,
|
T: StringType + Clone,
|
||||||
{
|
{
|
||||||
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
||||||
match self.wordlist_type {
|
t.component("MnemonicKeyboard"); // unified with TT
|
||||||
WordlistType::Bip39 => t.component("Bip39Entry"),
|
|
||||||
WordlistType::Slip39 => t.component("Slip39Entry"),
|
|
||||||
}
|
|
||||||
t.string("textbox", self.textbox.content());
|
t.string("textbox", self.textbox.content());
|
||||||
|
|
||||||
if self.offer_words {
|
if self.offer_words {
|
||||||
|
@ -239,3 +239,13 @@ impl Bip39Input {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DEBUG-ONLY SECTION BELOW
|
||||||
|
|
||||||
|
#[cfg(feature = "ui_debug")]
|
||||||
|
impl crate::trace::Trace for Bip39Input {
|
||||||
|
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
||||||
|
t.component("Bip39Input");
|
||||||
|
t.child("textbox", &self.textbox);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -190,8 +190,14 @@ pub enum MnemonicInputMsg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "ui_debug")]
|
#[cfg(feature = "ui_debug")]
|
||||||
impl<T, U> crate::trace::Trace for MnemonicKeyboard<T, U> {
|
impl<T, U> crate::trace::Trace for MnemonicKeyboard<T, U>
|
||||||
|
where
|
||||||
|
T: MnemonicInput + crate::trace::Trace,
|
||||||
|
U: AsRef<str>,
|
||||||
|
{
|
||||||
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
||||||
t.component("MnemonicKeyboard");
|
t.component("MnemonicKeyboard");
|
||||||
|
t.child("prompt", &self.prompt);
|
||||||
|
t.child("input", &self.input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,3 +266,13 @@ impl Slip39Mask {
|
|||||||
self.0.count_ones() <= 1
|
self.0.count_ones() <= 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DEBUG-ONLY SECTION BELOW
|
||||||
|
|
||||||
|
#[cfg(feature = "ui_debug")]
|
||||||
|
impl crate::trace::Trace for Slip39Input {
|
||||||
|
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
||||||
|
t.component("Slip39Input");
|
||||||
|
t.child("textbox", &self.textbox);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user