From c1f3d3e5301768936a6f3082286415f0338fbe07 Mon Sep 17 00:00:00 2001 From: obrusvit Date: Fri, 13 Dec 2024 17:44:08 +0100 Subject: [PATCH] fixup! fixup! refactor(core): safe iface for get_glyph_data --- core/embed/rust/src/ui/display/font.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/embed/rust/src/ui/display/font.rs b/core/embed/rust/src/ui/display/font.rs index b606449668..10562b71aa 100644 --- a/core/embed/rust/src/ui/display/font.rs +++ b/core/embed/rust/src/ui/display/font.rs @@ -313,15 +313,15 @@ impl Font { } pub fn text_height(self) -> i16 { - unwrap!(display::get_font_info(self.into()).map(|f| f.height.try_into().unwrap())) + unwrap!(display::get_font_info(self.into()).map(|f| f.height as i16)) } pub fn text_max_height(self) -> i16 { - unwrap!(display::get_font_info(self.into()).map(|f| f.max_height.try_into().unwrap())) + unwrap!(display::get_font_info(self.into()).map(|f| f.max_height as i16)) } pub fn text_baseline(self) -> i16 { - unwrap!(display::get_font_info(self.into()).map(|f| f.baseline.try_into().unwrap())) + unwrap!(display::get_font_info(self.into()).map(|f| f.baseline as i16)) } pub fn line_height(self) -> i16 {