From d370c72425fa8564c22cd460b18b409d77d385e6 Mon Sep 17 00:00:00 2001 From: louis-e <44675238+louis-e@users.noreply.github.com> Date: Wed, 23 Jul 2025 21:13:46 +0200 Subject: [PATCH] Fix cargo fmt --- src/elevation_data.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/elevation_data.rs b/src/elevation_data.rs index 701e8e8..087d183 100644 --- a/src/elevation_data.rs +++ b/src/elevation_data.rs @@ -438,11 +438,10 @@ fn filter_elevation_outliers(height_grid: &mut [Vec]) { let mut outliers_filtered = 0; // Replace outliers with NaN, then fill them using interpolation - for (y, row) in height_grid.iter_mut().enumerate().take(height) { - for x in 0..width { - let h = row[x]; - if !h.is_nan() && (h < min_reasonable || h > max_reasonable) { - row[x] = f64::NAN; + for row in height_grid.iter_mut().take(height) { + for h in row.iter_mut().take(width) { + if !h.is_nan() && (*h < min_reasonable || *h > max_reasonable) { + *h = f64::NAN; outliers_filtered += 1; } }