use 'clamp' function (clippy::manual_clamp)

This commit is contained in:
Daniel Eades 2024-04-14 21:08:03 +01:00 committed by Jeremy Soller
parent 4b7c0ca15a
commit d3eb8d5ad0
2 changed files with 3 additions and 3 deletions

View file

@ -364,7 +364,7 @@ where
if !metadata.flags.is_empty() {
let style_line_height =
(self.glyph_font_size / 10.0).max(2.0).min(16.0);
(self.glyph_font_size / 10.0).clamp(2.0, 16.0);
let line_color = cosmic_text_to_iced_color(metadata.underline_color);