Skip to content

Commit

Permalink
Resolve clippy warnings
Browse files Browse the repository at this point in the history
Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints
  • Loading branch information
jeevithakannan2 committed Nov 30, 2024
1 parent 468ba6e commit c0966d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tui/src/floating_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tui/src/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Line<'static>> = Vec::with_capacity(rows);

Expand Down

0 comments on commit c0966d4

Please sign in to comment.