From 74ad10d44127b41b970a1d7e643abe64f2bcfd11 Mon Sep 17 00:00:00 2001 From: obrusvit Date: Wed, 11 Dec 2024 00:08:10 +0100 Subject: [PATCH] fixup! fixup! refactor(core): safe iface for get_glyph_data --- core/embed/rust/src/ui/display/font.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/embed/rust/src/ui/display/font.rs b/core/embed/rust/src/ui/display/font.rs index 774fcf9a52..6209342804 100644 --- a/core/embed/rust/src/ui/display/font.rs +++ b/core/embed/rust/src/ui/display/font.rs @@ -368,9 +368,8 @@ impl Font { } text_width += c_width; } - }); - - text // the whole text fits + text // the whole text fits + }) } /// Get the length of the longest suffix from a given `text` @@ -387,9 +386,8 @@ impl Font { } text_width += char_width; } - }); - - text.len() // it fits in its entirety + text.len() // it fits in its entirety + }) } pub fn visible_text_height_ex(&self, text: &str) -> (i16, i16) {