From 56fb28fa2b7fa45a6cc067ea147dc94a7cf08d4c Mon Sep 17 00:00:00 2001 From: grom Date: Sun, 18 Oct 2026 15:18:10 -0600 Subject: [PATCH] gates: clippy clean again, and the mail repro that never was for commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `scripts/check.sh` has been failing before it ran a single test, on 62 clippy findings in code none of the recent rounds touched — 32 in `benilla-world`, 30 in `benilla-app` — so the in-loop gate could not tell anyone anything. Every one is a newer clippy noticing older code (`as_chunks` and `is_multiple_of` are both lints younger than the lines they fire on), and they are fixed, not silenced, except where the silence is the point: - **Argued allows, the house idiom.** `clippy::type_complexity` on ten Bevy system signatures and two inline caster queries, each with the one-line reason beside it, as the other 67 in this workspace have. `clippy::approx_constant` on `liquid/waves.rs`'s `TWO_PI`, whose own doc already says why it is spelled `6.2831853`: it mirrors a shader line, and `f32::consts::TAU` would stop reading against the file it copies. - **Two runtime assertions became compile-time ones** (`EXT_SEL_EMPTY is index 255`, the endless-stream frame count): a claim about constants should fail the build that breaks it, not a test run after it. - **Three real, if harmless, redundancies gone**: `len > MAX_TILT_TAN && len > 0.0` (the constant is `tan(4°)`, so the second test never spoke), `u32::from(..) + 1 | flags` now parenthesised where `+` binds tighter than `|`, and `palette.get(0)`. - The rest is mechanical: `chunks_exact(3)` → `as_chunks::<3>()`, `map_or(true, ..)` → `is_none_or`, two `Default::default()`-then-assign test fixtures, a doc line that began `1.` and so turned its own paragraph into a list item, and `local_utc_offset_secs` moved above the test module it had drifted below. `tests/repro_mail.rs` is deleted. Its first line says "TEMPORARY repro harness — not for commit"; it reads a loose mirror of FrameXML out of `/tmp/opencode/ vanilla-ui`, which no longer exists, so it has been failing on a missing directory rather than telling anyone about mail. What is left of the gate's red is one test: `world_api_wall` counts 174 crossings of the `benilla-world` boundary against a ceiling of 107 — 90 of them already filed with a close plan, 84 unsorted. That is not cleanup; the wall's own message says the remedies are to close the crossing or to publish it as engine API with the record that says so, and 84 of those is a design pass on what the engine's public surface is. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn --- crates/benilla-app/src/character_shadow.rs | 1 + crates/benilla-app/src/cvars.rs | 4 +- .../benilla-app/src/entities/carried_light.rs | 1 + crates/benilla-app/src/login/screen.rs | 2 +- crates/benilla-app/src/portrait/mod.rs | 5 +- crates/benilla-app/src/post/sun_shafts.rs | 1 + crates/benilla-app/src/shadow_core.rs | 6 +- crates/benilla-app/src/sound/http_stream.rs | 2 +- crates/benilla-app/src/torch_shadow.rs | 168 +++++++++--------- crates/benilla-app/src/ui_chat/tests.rs | 1 - crates/benilla-app/src/ui_chr_classes.rs | 8 +- crates/benilla-app/src/ui_inspect.rs | 2 +- crates/benilla-app/src/ui_items/mod.rs | 5 +- .../benilla-app/src/ui_script/flash_trace.rs | 2 +- crates/benilla-app/src/ui_script/lifecycle.rs | 48 ++--- crates/benilla-app/src/volumetric_fog.rs | 1 + crates/benilla-app/src/volumetric_light.rs | 2 +- crates/benilla-app/src/vplates.rs | 1 + crates/benilla-app/src/world_shadow.rs | 15 +- crates/benilla-app/tests/repro_mail.rs | 137 -------------- crates/benilla-world/src/lighting/blob.rs | 1 - crates/benilla-world/src/lighting/daylight.rs | 25 +-- .../src/lighting/daylight/census.rs | 5 +- .../benilla-world/src/lighting/fog_model.rs | 8 +- .../src/lighting/global_light.rs | 8 +- crates/benilla-world/src/liquid/lod.rs | 4 +- crates/benilla-world/src/liquid/waves.rs | 12 +- crates/benilla-world/src/static_gx/render.rs | 2 +- crates/benilla-world/src/static_gx/shadow.rs | 4 +- .../src/static_gx/torch_depth.rs | 2 +- crates/benilla-world/src/water_fx/bob.rs | 2 +- crates/benilla-world/src/water_fx/mod.rs | 16 +- crates/benilla-world/src/weather/wetness.rs | 6 +- 33 files changed, 202 insertions(+), 305 deletions(-) delete mode 100644 crates/benilla-app/tests/repro_mail.rs diff --git a/crates/benilla-app/src/character_shadow.rs b/crates/benilla-app/src/character_shadow.rs index cdb5452f..a78406e8 100644 --- a/crates/benilla-app/src/character_shadow.rs +++ b/crates/benilla-app/src/character_shadow.rs @@ -51,6 +51,7 @@ struct CharacterLane { } #[allow(clippy::too_many_arguments)] +#[allow(clippy::type_complexity)] // one Bevy system's full input set fn collect_character_shadows( video: Res, time: Res