mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-05 17:56:10 +00:00
style(core/rust): rustfmt
This commit is contained in:
parent
8e52081d8a
commit
8cf039740f
@ -14,7 +14,10 @@ use crate::{
|
||||
event::TouchEvent,
|
||||
geometry::{Alignment, Alignment2D, Grid, Insets, Offset, Rect},
|
||||
model_mercury::component::{
|
||||
button::{Button, ButtonContent, ButtonMsg::{self, Clicked}},
|
||||
button::{
|
||||
Button, ButtonContent,
|
||||
ButtonMsg::{self, Clicked},
|
||||
},
|
||||
theme,
|
||||
},
|
||||
shape::{self, Renderer},
|
||||
|
@ -3,7 +3,9 @@ use core::iter;
|
||||
use heapless::String;
|
||||
|
||||
use crate::{
|
||||
strutil::ShortString, trezorhal::slip39, ui::{
|
||||
strutil::ShortString,
|
||||
trezorhal::slip39,
|
||||
ui::{
|
||||
component::{
|
||||
text::common::{TextBox, TextEdit},
|
||||
Component, Event, EventCtx,
|
||||
@ -22,7 +24,7 @@ use crate::{
|
||||
},
|
||||
shape::{self, Renderer},
|
||||
util::ResultExt,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
const MAX_LENGTH: usize = 8;
|
||||
@ -227,9 +229,7 @@ impl Slip39Input {
|
||||
}
|
||||
}
|
||||
|
||||
fn setup_from_prefilled_word(
|
||||
word: &str,
|
||||
) -> (ShortString, Slip39Mask, Option<&'static str>) {
|
||||
fn setup_from_prefilled_word(word: &str) -> (ShortString, Slip39Mask, Option<&'static str>) {
|
||||
let mut buff = ShortString::new();
|
||||
|
||||
// Gradually appending encoded key digits to the buffer and checking if
|
||||
|
@ -2,7 +2,8 @@ use crate::ui::{
|
||||
component::{text::TextStyle, LineBreaking::BreakWordsNoHyphen},
|
||||
constant::{HEIGHT, WIDTH},
|
||||
display::{Color, Font},
|
||||
geometry::{Offset, Point, Rect}, util::include_res,
|
||||
geometry::{Offset, Point, Rect},
|
||||
util::include_res,
|
||||
};
|
||||
|
||||
use super::super::{
|
||||
|
@ -10,7 +10,8 @@ use crate::{
|
||||
FixedHeightBar,
|
||||
},
|
||||
display::{Color, Font},
|
||||
geometry::Insets, util::include_icon,
|
||||
geometry::Insets,
|
||||
util::include_icon,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
use crate::{
|
||||
strutil::ShortString, translations::TR, ui::{
|
||||
strutil::ShortString,
|
||||
translations::TR,
|
||||
ui::{
|
||||
component::{Component, Event, EventCtx},
|
||||
geometry::Rect,
|
||||
shape::Renderer,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
use super::super::{ButtonLayout, ChoiceFactory, ChoiceItem, ChoicePage};
|
||||
|
@ -14,7 +14,10 @@ use crate::{
|
||||
event::TouchEvent,
|
||||
geometry::{Alignment, Alignment2D, Grid, Insets, Offset, Rect},
|
||||
model_tt::component::{
|
||||
button::{Button, ButtonContent, ButtonMsg::{self, Clicked}},
|
||||
button::{
|
||||
Button, ButtonContent,
|
||||
ButtonMsg::{self, Clicked},
|
||||
},
|
||||
theme,
|
||||
},
|
||||
shape::{self, Renderer},
|
||||
|
@ -3,7 +3,9 @@ use core::iter;
|
||||
use heapless::String;
|
||||
|
||||
use crate::{
|
||||
strutil::ShortString, trezorhal::slip39, ui::{
|
||||
strutil::ShortString,
|
||||
trezorhal::slip39,
|
||||
ui::{
|
||||
component::{
|
||||
text::common::{TextBox, TextEdit},
|
||||
Component, Event, EventCtx,
|
||||
@ -22,7 +24,7 @@ use crate::{
|
||||
},
|
||||
shape::{self, Renderer},
|
||||
util::ResultExt,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
const MAX_LENGTH: usize = 8;
|
||||
@ -286,9 +288,7 @@ impl Slip39Input {
|
||||
}
|
||||
}
|
||||
|
||||
fn setup_from_prefilled_word(
|
||||
word: &str,
|
||||
) -> (ShortString, Slip39Mask, Option<&'static str>) {
|
||||
fn setup_from_prefilled_word(word: &str) -> (ShortString, Slip39Mask, Option<&'static str>) {
|
||||
let mut buff = ShortString::new();
|
||||
|
||||
// Gradually appending encoded key digits to the buffer and checking if
|
||||
|
@ -6,7 +6,8 @@ use crate::ui::{
|
||||
model_tt::{
|
||||
component::{ButtonStyle, ButtonStyleSheet, ResultStyle},
|
||||
theme::{BLACK, FG, GREY_DARK, GREY_LIGHT, WHITE},
|
||||
}, util::include_res,
|
||||
},
|
||||
util::include_res,
|
||||
};
|
||||
|
||||
pub const BLD_BG: Color = Color::rgb(0x00, 0x1E, 0xAD);
|
||||
|
Loading…
Reference in New Issue
Block a user