From 753fbe863dc0a22d5a30324231f7fc074b4d9816 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Sat, 31 Aug 2024 14:37:36 +0200 Subject: [PATCH] Small nit --- src/tui/app/machine/matches.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/tui/app/machine/matches.rs b/src/tui/app/machine/matches.rs index d784db2..80265d4 100644 --- a/src/tui/app/machine/matches.rs +++ b/src/tui/app/machine/matches.rs @@ -153,12 +153,8 @@ impl IAppInteractMatches for AppMachine { let result = index.saturating_add(1); let to = cmp::min( result, - self.state - .current - .as_ref() - .expect("selected() implies current exists") - .len() - .saturating_sub(1), + // selected() implies current exists + self.state.current.as_ref().unwrap().len().saturating_sub(1), ); self.state.state.list.select(Some(to)); }