mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-25 04:49:44 +00:00
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:
parent
468ba6e34d
commit
c0966d464e
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user