From 9f6170b23492dbfc94c816ae714d5343d0d2fe3f Mon Sep 17 00:00:00 2001 From: nyyu Date: Sun, 14 Mar 2021 15:08:30 +0100 Subject: [PATCH] Optimize loop --- src/cgg_data_source.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cgg_data_source.rs b/src/cgg_data_source.rs index 2bed04f..ff8e07a 100644 --- a/src/cgg_data_source.rs +++ b/src/cgg_data_source.rs @@ -159,6 +159,7 @@ impl DataSource for CGGDataSource { for champion in reports.iter() { if champion.champion_id.to_string() == champ.key && champion.role == position { some_champ = Some(champion); + break; } } if let Some(champ) = some_champ {