Resolve clippy warnings

Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints
This commit is contained in:
Jeevitha Kannan K S 2024-11-30 18:33:58 +05:30
parent 468ba6e34d
commit c0966d464e
No known key found for this signature in database
GPG Key ID: 5904C34A2F7CE333
2 changed files with 2 additions and 2 deletions

View File

@ -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) { fn draw(&mut self, frame: &mut Frame, area: Rect, _theme: &Theme) {
let block = Block::default() let block = Block::default()
.borders(Borders::ALL) .borders(Borders::ALL)

View File

@ -36,7 +36,7 @@ pub fn create_shortcut_list(
.unwrap_or(0); .unwrap_or(0);
let columns = (render_width as usize / (max_shortcut_width + 4)).max(1); 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); let mut lines: Vec<Line<'static>> = Vec::with_capacity(rows);