diff --git a/rust/prop_grid_rs/src/grid.rs b/rust/prop_grid_rs/src/grid.rs index c1a70591..258cc4ba 100644 --- a/rust/prop_grid_rs/src/grid.rs +++ b/rust/prop_grid_rs/src/grid.rs @@ -94,7 +94,7 @@ pub fn hrdps_only_points() -> Vec<(f64, f64)> { #[inline] fn in_conus_bbox(lat: f64, lon: f64) -> bool { - lat >= LAT_MIN && lat <= LAT_MAX && lon >= LON_MIN && lon <= LON_MAX + (LAT_MIN..=LAT_MAX).contains(&lat) && (LON_MIN..=LON_MAX).contains(&lon) } /// Matches Elixir's `Float.round(x, 3)` — banker's rounding isn't used, diff --git a/rust/prop_grid_rs/src/pipeline.rs b/rust/prop_grid_rs/src/pipeline.rs index c4d3df7a..8cd1c79c 100644 --- a/rust/prop_grid_rs/src/pipeline.rs +++ b/rust/prop_grid_rs/src/pipeline.rs @@ -424,16 +424,15 @@ fn backfill_dpt_from_depr(cell: &mut CellValues) { // two passes so the iteration in pass 1 isn't invalidated by the // mutation in pass 2. let pending: Vec<(std::sync::Arc, f32)> = cell - .iter() - .filter_map(|(key, _)| { + .keys() + .filter_map(|key| { let depr_key = key.strip_prefix("DEPR:")?; - let tmp_key = format!("TMP:{}", depr_key); - let dpt_key: std::sync::Arc = format!("DPT:{}", depr_key).into(); + let tmp_key: std::sync::Arc = format!("TMP:{depr_key}").into(); + let dpt_key: std::sync::Arc = format!("DPT:{depr_key}").into(); if cell.contains_key(&dpt_key) { return None; } - let tmp_lookup: std::sync::Arc = tmp_key.into(); - let tmp = cell.get(&tmp_lookup).copied()?; + let tmp = cell.get(&tmp_key).copied()?; let depr = cell.get(key).copied()?; Some((dpt_key, tmp - depr)) })