From 56c0ec1b7b4da0dc71cf13c81fc83d1fd0be44be Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 16 Nov 2020 18:42:34 -0500 Subject: [PATCH] clean up --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2ebc5eb..5f2a9a4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -441,8 +441,8 @@ async fn run() -> Result<()> { } else { continue; } - } else if selected < filtered.len() { - filtered[selected] + } else if let Some(&x) = filtered.get(selected) { + x } else { continue; })