From c3679bb8e92c0ca2a6594ae2e42aae0cb3238314 Mon Sep 17 00:00:00 2001 From: Hernawan Fa'iz Abdillah Date: Fri, 21 Jul 2023 09:50:50 +0700 Subject: [PATCH] fix use is_empty rather check len --- src/engine.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine.rs b/src/engine.rs index 794d40e9..6e0b6c33 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -967,7 +967,7 @@ impl Reedline { return Ok(EventStatus::Handled); } - if menu.get_values().len() == 0 { + if menu.get_values().is_empty() { menu.menu_event(MenuEvent::Deactivate); return Ok(EventStatus::Inapplicable); }