mirror of
https://github.com/uutils/procps.git
synced 2026-06-10 16:14:00 -07:00
top: fix warning from manual_saturating_arithmetic
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user