Only output missing groups when there're some

This commit is contained in:
Nobody 2022-04-05 22:04:13 +05:00
parent 00f40d2bde
commit 5af44e8900

View File

@ -142,7 +142,9 @@ impl LuaManager {
let groups = groups.into_iter().map(|(group_id, result)| (group_id, result.unwrap())).collect(); 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(); 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 groups
}; };