Clippy: victory-shader is clean again with -D warnings (10 lints, no behaviour change) #3

Open
github-bot wants to merge 1 commit from github-bot/gh-3 into main AGit
Owner

@⁠MamaLeVrai on GitHub · 2026-11-25 11:09 UTC · original
MamaLeVrai:clippy-clean → main · +21 −27 · 4 files · 1 commits · open

cargo clippy --workspace --all-targets --locked -- -D warnings fails on main (4cbe9d7) first in victory-shader with 10 errors (Windows 11, RX 6950 XT, Rust 1.98.1; the same with --all-features). This fixes those, with no change of behaviour:

  • native.rs: the literal 0x4D45_4D is written 0x004D_454D (same value); a type alias Patch for the VICTORY_SHADER_PATCH entries; next > u32::from(SGPRS) is next > SGPRS (SGPRS is already a u32).
  • emit/bitcode.rs: Module::int_value was never used; removed.
  • emit/lower.rs: a type alias HandleKey for the key of handles; self.scalar.get(&site).is_none() is !self.scalar.contains_key(&site) (twice); half_inputs: { let hi = ...; hi } is the expression itself.
  • emit/mod.rs: a type alias PsvInterp; the let plain = match ... ; plain is the match.

Checks. cargo clippy -p victory-shader --all-targets --no-deps -- -D warnings, with and without --all-features: clean. cargo test -p victory-shader --lib: 264 passed, 2 failed, 6 ignored; the two failures are the same two tests that fail on main without this change (see issue #2), so they are not from it.

What this does not do. Other crates still fail clippy: victory-gpu has 38 errors in its library (and 44 with its tests), so cargo clippy --workspace still fails. I left them: they touch many files of the GPU code that you are working in, and I did not want to conflict with it. Say so if you want them in a second PR.

AI-assisted (Claude Code); no game data.

🤖 Generated with Claude Code

**@⁠MamaLeVrai** on GitHub · 2026-11-25 11:09 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/3) `MamaLeVrai:clippy-clean` → `main` · +21 −27 · 4 files · 1 commits · open `cargo clippy --workspace --all-targets --locked -- -D warnings` fails on `main` (`4cbe9d7`) first in `victory-shader` with 10 errors (Windows 11, RX 6950 XT, Rust 1.98.1; the same with `--all-features`). This fixes those, with no change of behaviour: - `native.rs`: the literal `0x4D45_4D` is written `0x004D_454D` (same value); a type alias `Patch` for the `VICTORY_SHADER_PATCH` entries; `next > u32::from(SGPRS)` is `next > SGPRS` (`SGPRS` is already a `u32`). - `emit/bitcode.rs`: `Module::int_value` was never used; removed. - `emit/lower.rs`: a type alias `HandleKey` for the key of `handles`; `self.scalar.get(&site).is_none()` is `!self.scalar.contains_key(&site)` (twice); `half_inputs: { let hi = ...; hi }` is the expression itself. - `emit/mod.rs`: a type alias `PsvInterp`; the `let plain = match ... ; plain` is the `match`. **Checks.** `cargo clippy -p victory-shader --all-targets --no-deps -- -D warnings`, with and without `--all-features`: clean. `cargo test -p victory-shader --lib`: 264 passed, 2 failed, 6 ignored; the two failures are the same two tests that fail on `main` without this change (see issue #2), so they are not from it. **What this does not do.** Other crates still fail clippy: `victory-gpu` has 38 errors in its library (and 44 with its tests), so `cargo clippy --workspace` still fails. I left them: they touch many files of the GPU code that you are working in, and I did not want to conflict with it. Say so if you want them in a second PR. AI-assisted (Claude Code); no game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
No behaviour change: a hex literal grouped like its width (0x004D_454D, the same value), the
never-used Module::int_value removed, three type aliases (HandleKey, PsvInterp, Patch), two
get(..).is_none() as !contains_key(..), two returns of a let binding, a useless u32::from.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:33:01 +00:00
Author
Owner

@⁠Ekabusto on GitHub · 2026-11-25 12:47 UTC · original

Checked locally: builds, cargo clippy -p victory-shader --all-targets --no-deps goes from 12 warnings on main to 0, and cargo test -p victory-shader --lib passes (266 passed, 6 ignored). All 10 changes are mechanical with no change of behaviour (the 0x004D_454D literal is the same value; SGPRS is already a u32). No conflicts with main or the other open PRs. Looks good to me.

Reviewed on Windows 11 (build 26300), Rust 1.98.1, each PR in its own worktree; no game data, not run in the game. AI-assisted (Claude Code).

**@⁠Ekabusto** on GitHub · 2026-11-25 12:47 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/3#issuecomment-7162858097) Checked locally: builds, `cargo clippy -p victory-shader --all-targets --no-deps` goes from 12 warnings on `main` to 0, and `cargo test -p victory-shader --lib` passes (266 passed, 6 ignored). All 10 changes are mechanical with no change of behaviour (the `0x004D_454D` literal is the same value; `SGPRS` is already a `u32`). No conflicts with `main` or the other open PRs. Looks good to me. Reviewed on Windows 11 (build 26300), Rust 1.98.1, each PR in its own worktree; no game data, not run in the game. AI-assisted (Claude Code).
Author
Owner

@⁠ySKELLETONX on GitHub · 2026-11-25 16:36 UTC · original

Tested on an RX 7600 XT 16 GB (RDNA3, Navi 33), driver 32.0.32015.2008, Windows 11 Pro build 26300, Rust 1.98.1, at 688b1ab: cargo test -p victory-shader --lib --locked: 266 passed, 0 failed, 6 ignored, hardware dispatch tests included (main at 01aadd1: 266 passed). Two runs, with #140 applied on top. Without it, parallel victory-shader runs here sometimes crash inside WARP (d3d10warp.dll, STATUS_ACCESS_VIOLATION). main does that too, so it has nothing to do with this PR, but it made the first run of this PR look broken. Workspace tests only; not run in the title.

**@⁠ySKELLETONX** on GitHub · 2026-11-25 16:36 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/3#issuecomment-7168245385) Tested on an RX 7600 XT 16 GB (RDNA3, Navi 33), driver 32.0.32015.2008, Windows 11 Pro build 26300, Rust 1.98.1, at `688b1ab`: `cargo test -p victory-shader --lib --locked`: **266 passed, 0 failed, 6 ignored**, hardware dispatch tests included (`main` at `01aadd1`: 266 passed). Two runs, with #140 applied on top. Without it, parallel `victory-shader` runs here sometimes crash inside WARP (`d3d10warp.dll`, STATUS_ACCESS_VIOLATION). `main` does that too, so it has nothing to do with this PR, but it made the first run of this PR look broken. Workspace tests only; not run in the title.
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-11-25 11:09 UTC · original · reviewed

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-11-25 11:09 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/3#pullrequestreview-6056505618) · **reviewed** Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Author
Owner

@⁠vdomas7 on GitHub · 2026-11-25 11:19 UTC · original · approved these changes

**@⁠vdomas7** on GitHub · 2026-11-25 11:19 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/3#pullrequestreview-6056669932) · **approved these changes**
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3/head:github-bot/gh-3'
git switch 'github-bot/gh-3'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3'
git switch 'github-bot/gh-3'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3'
git switch 'github-bot/gh-3'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3'
git switch 'main'
git merge --squash 'github-bot/gh-3'
git switch 'main'
git merge --ff-only 'github-bot/gh-3'
git switch 'main'
git merge 'github-bot/gh-3'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.