From 111dbc6855a70aa644197e430f457b72a82bbaca Mon Sep 17 00:00:00 2001 From: NOWN-DEV <257771410+NOWN-DEV@users.noreply.github.com> Date: Sun, 25 Oct 2026 20:23:04 +0000 Subject: [PATCH] Render: the radiance bound check uses a range, as clippy 1.97 asks (#6650) `cargo clippy --workspace --all-targets -- -D warnings` fails on Rust 1.97: the reflection radiance bound in crates/render/src/raytrace/image.rs (#5494) trips `clippy::manual_range_contains` (`v < 0.0 || v > 1e12`). It now reads `!(0.0..=1e12).contains(&v)`. The two differ only for NaN, which the `is_finite` check in front of it already refuses, so nothing else changes. Co-authored-by: Claude Opus 5.5 --- crates/render/src/raytrace/image.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/render/src/raytrace/image.rs b/crates/render/src/raytrace/image.rs index 5facf5a3d..4a24a4a00 100644 --- a/crates/render/src/raytrace/image.rs +++ b/crates/render/src/raytrace/image.rs @@ -749,7 +749,7 @@ impl ImageTask { for _ in 0..repeats { self.pixel_radiance += radiance; if !self.pixel_radiance.is_finite() - || [self.pixel_radiance.x, self.pixel_radiance.y, self.pixel_radiance.z].into_iter().any(|v| v < 0.0 || v > 1e12) + || [self.pixel_radiance.x, self.pixel_radiance.y, self.pixel_radiance.z].into_iter().any(|v| !(0.0..=1e12).contains(&v)) { return Err(invalid("reflection radiance exceeds finite transport bound")); }