top: fix warning from manual_saturating_arithmetic

This commit is contained in:
Daniel Hofstetter
2026-03-06 08:27:44 +01:00
parent 367fa3cfc7
commit 2cd799820d
+1 -5
View File
@@ -552,11 +552,7 @@ impl Widget for Tui<'_> {
fn render(mut self, area: Rect, buf: &mut Buffer) {
self.stat.list_offset = min(
self.stat.list_offset,
self.proc_list
.collected
.len()
.checked_sub(1)
.unwrap_or_default(),
self.proc_list.collected.len().saturating_sub(1),
);
let layout = Layout::new(
Direction::Vertical,