diff --git a/tui/src/floating_text.rs b/tui/src/floating_text.rs index c2077de5..13ae33d7 100644 --- a/tui/src/floating_text.rs +++ b/tui/src/floating_text.rs @@ -171,7 +171,7 @@ impl<'a> FloatingText<'a> { } } -impl<'a> FloatContent for FloatingText<'a> { +impl FloatContent for FloatingText<'_> { fn draw(&mut self, frame: &mut Frame, area: Rect, _theme: &Theme) { let block = Block::default() .borders(Borders::ALL) diff --git a/tui/src/hint.rs b/tui/src/hint.rs index 0f77f7a5..2849961f 100644 --- a/tui/src/hint.rs +++ b/tui/src/hint.rs @@ -36,7 +36,7 @@ pub fn create_shortcut_list( .unwrap_or(0); let columns = (render_width as usize / (max_shortcut_width + 4)).max(1); - let rows = (shortcut_spans.len() + columns - 1) / columns; + let rows = shortcut_spans.len().div_ceil(columns); let mut lines: Vec> = Vec::with_capacity(rows);