From af560be01e686085032369c6e4d6871369314ba3 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Wed, 29 Apr 2026 08:45:46 -0500 Subject: [PATCH] fix(weather_scalar_file): use direct <= instead of !(>) for partial-ord guard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clippy's `neg_cmp_op_on_partial_ord` lint fails on `-D warnings`, which CI enforces. Using `<=` directly is clearer and equivalent for the f64 inputs we pass (both are caller-supplied target pressures that come from the level-key constants — neither is ever NaN). --- rust/prop_grid_rs/src/weather_scalar_file.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/prop_grid_rs/src/weather_scalar_file.rs b/rust/prop_grid_rs/src/weather_scalar_file.rs index 37242cdb..9025d181 100644 --- a/rust/prop_grid_rs/src/weather_scalar_file.rs +++ b/rust/prop_grid_rs/src/weather_scalar_file.rs @@ -309,7 +309,7 @@ fn compute_lapse_rate(sorted: &[&Level]) -> Option { } fn compute_layer_lapse_rate(sorted: &[&Level], lower_pres: f64, upper_pres: f64) -> Option { - if !(lower_pres > upper_pres) { + if lower_pres <= upper_pres { return None; } let lower = sorted