From d21ea00d7cdcfbf07c2850c66050f79fc137299a Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 08:42:19 -0800 Subject: [PATCH] craft-raster3d: wrap the shadow depth fallback to rustfmt's width The lint job's cargo fmt --check failed on crates/raster3d/src/shade.rs:388: the last push left the f64 fallback for a non-finite light-space depth on one line past max_width, so rustfmt wants each term on its own line. The expression and its evaluation order are unchanged. --- crates/raster3d/src/shade.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/raster3d/src/shade.rs b/crates/raster3d/src/shade.rs index 146660a0c7..1af5b737f8 100644 --- a/crates/raster3d/src/shade.rs +++ b/crates/raster3d/src/shade.rs @@ -385,7 +385,10 @@ fn shadow_factor(m: &ShadowMap, texels: &[f32], p: [f32; 3], ng: [f32; 3], n_l: let z = if z.is_finite() { f64::from(z) } else { - f64::from(w[2][0]) * f64::from(p[0]) + f64::from(w[2][1]) * f64::from(p[1]) + f64::from(w[2][2]) * f64::from(p[2]) + f64::from(w[2][3]) + f64::from(w[2][0]) * f64::from(p[0]) + + f64::from(w[2][1]) * f64::from(p[1]) + + f64::from(w[2][2]) * f64::from(p[2]) + + f64::from(w[2][3]) }; let focal = f64::from(m.focal); let texel = if m.ortho { 1.0 / focal } else { z.abs() / focal };