aboutsummaryrefslogtreecommitdiff
path: root/src/ui/sidebar.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-09 23:16:24 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-09 23:16:24 +0300
commit9f210e973834700d14c6c0283ed750ed5b038e8b (patch)
treecd8c75755c59fdc47bf71ca6dc34e49ab0258ae6 /src/ui/sidebar.rs
parent3a9888cd564dc45d23a7bdd0dba29a6ff1ef48a1 (diff)
chore: enable clippy linting
Diffstat (limited to 'src/ui/sidebar.rs')
-rw-r--r--src/ui/sidebar.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/sidebar.rs b/src/ui/sidebar.rs
index 04a3acd9..83ceebe0 100644
--- a/src/ui/sidebar.rs
+++ b/src/ui/sidebar.rs
@@ -32,7 +32,7 @@ fn sidebar_section_heights(total_h: u16, split_ratio: f32) -> (u16, u16) {
}
if total_h < 6 {
- let ws_h = (total_h + 1) / 2;
+ let ws_h = total_h.div_ceil(2);
return (ws_h, total_h.saturating_sub(ws_h));
}
@@ -385,7 +385,7 @@ pub(crate) fn collapsed_sidebar_sections(area: Rect) -> (Rect, Option<u16>, Rect
}
let total_h = content.height as usize;
- let ws_h = (total_h + 1) / 2;
+ let ws_h = total_h.div_ceil(2);
let detail_h = total_h.saturating_sub(ws_h + 1);
if ws_h == 0 || detail_h == 0 {
return (content, None, Rect::default());