Clippy: main's other 29 victory-gpu and victory-hle findings (with #2019 and #2486, the gate is clean) #2772

Open
ea0099 wants to merge 1 commit from upstream-pr/2772 into main
ea0099 commented 2026-11-29 17:08:38 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ea0099 on 2026-11-29T17:08:38Z.


What it changes

Main's CI stops at its first step: cargo clippy --workspace --all-targets --locked -- -D warnings has 38 findings on 55d0691, so neither the diagnostics clippy step nor the tests run for any push or pull request.

Two open PRs already clear some of them:

  • #2019 clears the five in victory-loader and victory-shader.
  • #2486 clears four in victory-gpu: font.rs's second '%' arm, which clippy reports twice, plus busy and adapter.

This clears the other 29, in victory-gpu and victory-hle, and touches none of the lines those two change. With the three in, the gate has no findings.

Written as clippy asks, with the same behaviour:

Where Finding Change
shader_cache.rs:14 unused import AtomicBool dropped
host/panel.rs:149, pipeline/library.rs:776 manual_is_multiple_of is_multiple_of
list.rs:2658 needless_borrow handles is already a &[u64]
resource.rs:2375 unnecessary_lazy_evaluations unwrap_or (a match on a local)
gameinput.rs:830, 876 unnecessary_lazy_evaluations then_some
compose.rs:221 too_many_arguments #[allow] on Composer::record, as on 48 other functions in the tree
streamline.rs:3689 assertions_on_constants the buffer-count test asserts in a const block
lib.rs:269, lifecycle.rs:1004 items_after_test_module the item after the test module moves above it
pipeline/library.rs:90 incompatible_msrv rust-version 1.88 → 1.89. File::try_lock already needs it, so the code doesn't build on 1.88 today. The toolchain is 1.98.1.

Unused since the 11.29.01 merge: kept, not deleted. Each one gets #[allow(dead_code)] and a one-line note. They look like wiring that got lost in the merge, not code nobody wants, so whoever puts them back has them:

  • Host::fetch_buffer with fetchmem::{sizes, buffer}: the fetch buffer that shrinks under memory pressure. This may be part of the memory handling you mentioned the next build restores.
  • take_spare_wb (its tests still run) and flush_all's MANY_CHUNK
  • flush_all's ahead snapshot: it is still filled, but nothing reads it. Shadow::nothing_new_with and watch::nothing_new_with, which took it, are unused too.
  • shadow::wide_chunk (VICTORY_WIDE_CHUNK; its tests still run)
  • HostHeap::mirror_for_pass (VICTORY_HEAP_LOOK_QUIET). The batch's own mirror_for_pass is the one that's called.
  • recycle::Kind::Card, memory::lock_memory, make::Queue::pop
  • create_loose_compute with loose_compute, fspx_container and MAX_LOOSE_PART: no device method slot names create_loose_compute

If you'd rather some of these were deleted, or wired back here, say which and I'll do it.

How it was tested

  • GPU and profile: none needed. There's no behaviour change.
  • Before: cargo clippy --workspace --all-targets --locked -- -D warnings on 55d0691 gives 38 findings.
  • After: with this, #2019 and #2486 merged together, the same command gives none. Checked locally (x86_64-pc-windows-msvc) and in upstream's own CI workflow on windows-latest: its Clippy step passes (run). The next step, Clippy, diagnostics build, then stops on the --all-features build errors this doesn't touch (copystat.rs's mb, the timing shadowed in host.rs), which #2048, #2143 and #2208 fix, so that run skipped the tests.
  • Shader changes: none.
  • cargo test passed for the crates it touches: not run yet: CI skipped the step after the diagnostics build. The change is lints, attributes and two moved items, with no behaviour change. For reference, on the same base cargo test fails three victory-formats bcpack oracle tests (oracle_parity_*) that this doesn't touch.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #2019, #2486 (the findings above are split so that none is fixed twice); #1566 and #1290 are older clippy rounds on lines main has since changed; #2048, #2143 and #2208 fix the --all-features build, which this doesn't touch.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5553064255 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2772). Originally posted by [ea0099](https://github.com/ea0099) on 2026-11-29T17:08:38Z. --- <!-- pr-fix --> ## What it changes Main's CI stops at its first step: `cargo clippy --workspace --all-targets --locked -- -D warnings` has **38 findings** on `55d0691`, so neither the diagnostics clippy step nor the tests run for any push or pull request. Two open PRs already clear some of them: - #2019 clears the five in `victory-loader` and `victory-shader`. - #2486 clears four in `victory-gpu`: `font.rs`'s second `'%'` arm, which clippy reports twice, plus `busy` and `adapter`. **This clears the other 29**, in `victory-gpu` and `victory-hle`, and touches none of the lines those two change. With the three in, the gate has no findings. **Written as clippy asks, with the same behaviour:** | Where | Finding | Change | |---|---|---| | `shader_cache.rs:14` | unused import | `AtomicBool` dropped | | `host/panel.rs:149`, `pipeline/library.rs:776` | `manual_is_multiple_of` | `is_multiple_of` | | `list.rs:2658` | `needless_borrow` | `handles` is already a `&[u64]` | | `resource.rs:2375` | `unnecessary_lazy_evaluations` | `unwrap_or` (a `match` on a local) | | `gameinput.rs:830, 876` | `unnecessary_lazy_evaluations` | `then_some` | | `compose.rs:221` | `too_many_arguments` | `#[allow]` on `Composer::record`, as on 48 other functions in the tree | | `streamline.rs:3689` | `assertions_on_constants` | the buffer-count test asserts in a `const` block | | `lib.rs:269`, `lifecycle.rs:1004` | `items_after_test_module` | the item after the test module moves above it | | `pipeline/library.rs:90` | `incompatible_msrv` | `rust-version` 1.88 → **1.89**. `File::try_lock` already needs it, so the code doesn't build on 1.88 today. The toolchain is 1.98.1. | **Unused since the 11.29.01 merge: kept, not deleted.** Each one gets `#[allow(dead_code)]` and a one-line note. They look like wiring that got lost in the merge, not code nobody wants, so whoever puts them back has them: - `Host::fetch_buffer` with `fetchmem::{sizes, buffer}`: the fetch buffer that shrinks under memory pressure. This may be part of the memory handling you mentioned the next build restores. - `take_spare_wb` (its tests still run) and `flush_all`'s `MANY_CHUNK` - `flush_all`'s ahead snapshot: it is still filled, but nothing reads it. `Shadow::nothing_new_with` and `watch::nothing_new_with`, which took it, are unused too. - `shadow::wide_chunk` (`VICTORY_WIDE_CHUNK`; its tests still run) - `HostHeap::mirror_for_pass` (`VICTORY_HEAP_LOOK_QUIET`). The batch's own `mirror_for_pass` is the one that's called. - `recycle::Kind::Card`, `memory::lock_memory`, `make::Queue::pop` - `create_loose_compute` with `loose_compute`, `fspx_container` and `MAX_LOOSE_PART`: no device method slot names `create_loose_compute` If you'd rather some of these were deleted, or wired back here, say which and I'll do it. ## How it was tested - **GPU and profile:** none needed. There's no behaviour change. - **Before:** `cargo clippy --workspace --all-targets --locked -- -D warnings` on `55d0691` gives 38 findings. - **After:** with this, #2019 and #2486 merged together, the same command gives none. Checked locally (`x86_64-pc-windows-msvc`) and in upstream's own CI workflow on `windows-latest`: its **Clippy** step passes ([run](https://github.com/ea0099/VIctory-AMD/actions/runs/46287544101)). The next step, *Clippy, diagnostics build*, then stops on the `--all-features` build errors this doesn't touch (`copystat.rs`'s `mb`, the `timing` shadowed in `host.rs`), which #2048, #2143 and #2208 fix, so that run skipped the tests. - **Shader changes:** none. - **`cargo test` passed for the crates it touches:** not run yet: CI skipped the step after the diagnostics build. The change is lints, attributes and two moved items, with no behaviour change. For reference, on the same base `cargo test` fails three `victory-formats` bcpack oracle tests (`oracle_parity_*`) that this doesn't touch. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #2019, #2486 (the findings above are split so that none is fixed twice); #1566 and #1290 are older clippy rounds on lines main has since changed; #2048, #2143 and #2208 fix the `--all-features` build, which this doesn't touch.
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/2772:upstream-pr/2772'
git switch 'upstream-pr/2772'

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/2772'
git switch 'upstream-pr/2772'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2772'
git switch 'upstream-pr/2772'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2772'
git switch 'main'
git merge --squash 'upstream-pr/2772'
git switch 'main'
git merge --ff-only 'upstream-pr/2772'
git switch 'main'
git merge 'upstream-pr/2772'
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
trustno1-coder/VIctory-NVIDIA!2772
No description provided.