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

Open
MamaLeVrai wants to merge 1 commit from upstream-pr/3 into main
MamaLeVrai commented 2026-11-25 11:09:31 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by MamaLeVrai on 2026-11-25T11:09:31Z.


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

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:issue:6603125791 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/3). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T11:09:31Z. --- `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)
copilot-pull-request-reviewer[bot] commented 2026-11-25 11:09:45 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T11:09:45Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:review:6056505618 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/3#pullrequestreview-6056505618). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-11-25T11:09:45Z. **Review:** COMMENTED --- 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.
Ekabusto commented 2026-11-25 12:47:21 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by Ekabusto on 2026-11-25T12:47:21Z.


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).

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7162858097 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/3#issuecomment-7162858097). Originally posted by [Ekabusto](https://github.com/Ekabusto) on 2026-11-25T12:47:21Z. --- 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).
ySKELLETONX commented 2026-11-25 16:36:16 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by ySKELLETONX on 2026-11-25T16:36:16Z.


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.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7168245385 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/3#issuecomment-7168245385). Originally posted by [ySKELLETONX](https://github.com/ySKELLETONX) on 2026-11-25T16:36:16Z. --- 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.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3:upstream-pr/3'
git switch 'upstream-pr/3'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3'
git switch 'upstream-pr/3'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3'
git switch 'upstream-pr/3'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3'
git switch 'main'
git merge --squash 'upstream-pr/3'
git switch 'main'
git merge --ff-only 'upstream-pr/3'
git switch 'main'
git merge 'upstream-pr/3'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Belobug/VIctory-Belobug-AMD!3
No description provided.