From 9e01b1862c2639a62cdf8a1833d9d6bef8dc4a1e Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 1 Mar 2022 21:58:27 -0500 Subject: [PATCH] use enumerate --- src/egui_app.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/egui_app.rs b/src/egui_app.rs index 5d9752a..6de84af 100644 --- a/src/egui_app.rs +++ b/src/egui_app.rs @@ -365,8 +365,7 @@ impl epi::App for MathApp { let minx_bounds: f64 = bounds.min()[0]; let maxx_bounds: f64 = bounds.max()[0]; - let mut i: usize = 0; - for function in self.functions.iter_mut() { + for (i, function) in self.functions.iter_mut().enumerate() { if self.func_strs[i].is_empty() { continue; } @@ -383,7 +382,6 @@ impl epi::App for MathApp { } else { area_list.push(f64::NAN); } - i += 1; } }); });