Repository navigation
clippy: the lints that are not dead code, so the CI step gets past victory-shader - #3
Open
erdemcisse wants to merge 1 commit into
Open
erdemcisse wants to merge 1 commit into
erdemcisse wants to merge 1 commit into
Conversation
…ctory-shader `cargo clippy --workspace --all-targets --locked -- -D warnings` has never passed here, and the two that stop it first are in `victory-shader`: * water_tile_slots.rs:80 `body.len() % 4 == 0` -> `.is_multiple_of(4)` * emit/mod.rs:2893 `let l = ...; l` -> return the call With those out of the way the next 27 errors are all `dead_code` in `victory-gpu` (the unused meta store the revert of the Leonida Continued merge left in `turbo.rs`, the port-7 counters in `watch.rs`, two `log_stats`), and whether that code is deleted, wired up or feature-gated is the owner's call: issue RedLightDOWN#2 has the inventory. What is left here is mechanical and has no such question: * shadow.rs:1714 `turns % 16 == 0` -> `.is_multiple_of(16)` * texture.rs:1562 `is_all_zero(&read)` -> `is_all_zero(read)` * watch.rs:3946 `open(&mut g, ...)` -> `open(&g, ...)` (`open` takes `&Guards`), and the `mut` on the guard it was borrowed from goes with it No behaviour change: `is_multiple_of` is `x % n == 0`, the borrow clippy points at is the one the compiler dereferences anyway, and `open` has always taken a shared reference.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
cargo clippy --workspace --all-targets --locked -- -D warningshas never passed on this repo, and CI stops there, socargo test --workspacehas never run (issue #2). The two errors that stop it first are mechanical, invictory-shader:With those two out of the way, the next 29 errors are in
victory-gpu: 27dead_codeand these three, which need no decision from anyone:crates/victory-gpu/src/shadow.rs:1714if turns % 16 == 0if turns.is_multiple_of(16)crates/victory-gpu/src/texture.rs:1562is_all_zero(&read)is_all_zero(read)crates/victory-gpu/src/watch.rs:3946open(&mut g, …)open(&g, …)(+ themutthe guard no longer needs)openhas always taken&Guards, so the&mutonly ever coerced;is_multiple_ofisx % n == 0; the&clippy points at is the one the compiler dereferences anyway. No behaviour change.What is left is deliberately not here. The 27 remaining errors are all
dead_code: the unused "meta store" (section 3. SHADER METADATA SIDECAR CACHE:ShaderMeta,MetaStore,META,META_MAGIC,meta_enabled,encode/decode_resource_kind,encode/decode_root,load_meta_file,meta_store,shader_meta_get/put,flush_meta_now) plusmix64,fast_hash_128*, twolog_stats, and thewatch.rsport counters — code thatRevert "merge: take non-RT performance and stability work from Leonida Continued"(732113e) left behind. Deleting, wiring up orcfg-gating it is your call, not mine to guess; issue #2 lists every item with its line.Tested
Rust 1.98.1 (the pin in
rust-toolchain.toml),x86_64-pc-windows-msvc, Windows 11 10.0.26100, MSVC 14.44.35207 — the same toolchain and target as the workflow.--all-featureshas more of the same kind (a never-constructedfaultbook::Unlockedvariant,alone_line, one moreis_multiple_of) — same dead-code question, same issue.GPUs tested: n/a — lints and unit tests, no device workload.
AI-assisted: yes — DeepSeek Harness (lead agent).