mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
chore(core/rust): transform if-elif into match
[no changelog]
This commit is contained in:
parent
66616bbf67
commit
d2f67d48fa
@ -381,14 +381,11 @@ where
|
||||
|
||||
/// Resolves text and finds possible icon names.
|
||||
pub fn from_text_possible_icon(text: T) -> Self {
|
||||
if text.as_ref() == "" {
|
||||
Self::cancel_icon()
|
||||
} else if text.as_ref() == "<" {
|
||||
Self::left_arrow_icon()
|
||||
} else if text.as_ref() == "^" {
|
||||
Self::up_arrow_icon()
|
||||
} else {
|
||||
Self::text(text)
|
||||
match text.as_ref() {
|
||||
"" => Self::cancel_icon(),
|
||||
"<" => Self::left_arrow_icon(),
|
||||
"^" => Self::up_arrow_icon(),
|
||||
_ => Self::text(text),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user