From 5af44e8900d7c2ad45e6de81192bf9b3bf8f9119 Mon Sep 17 00:00:00 2001 From: Nobody Date: Tue, 5 Apr 2022 22:04:13 +0500 Subject: [PATCH] Only output missing groups when there're some --- src/luamanager/lua_manager.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/luamanager/lua_manager.rs b/src/luamanager/lua_manager.rs index 17c6df1..ab48cf7 100644 --- a/src/luamanager/lua_manager.rs +++ b/src/luamanager/lua_manager.rs @@ -142,7 +142,9 @@ impl LuaManager { let groups = groups.into_iter().map(|(group_id, result)| (group_id, result.unwrap())).collect(); let errors: Vec<_> = errors.into_iter().map(|(group_id, result)| (group_id, result.unwrap_err())).collect(); - println!("Missing groups: {:?}", errors); + if errors.len() > 0 { + println!("Missing groups: {:?}", errors); + } groups };