From f67a1bd4ee5eadcc0eb1e53a2be5ab4a1be30024 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 18 Mar 2022 16:28:08 +0100 Subject: [PATCH] Improve code readability --- src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1457a3a..556f39c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -120,9 +120,7 @@ fn main() { let actions = get_actions(); let selected_action = actions - .iter() - .filter(|p| p.name.eq(&action)) - .next(); + .iter().find(|p| p.name.eq(&action)); let selected_action = match selected_action { None => {