Skip to content

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 into
trustno1-coder:mainfrom
ea0099:fix-gpu-warnings
Open

ea0099 wants to merge 1 commit into
trustno1-coder:mainfrom
ea0099:fix-gpu-warnings

Conversation

@ea0099

@ea0099 ea0099 commented Nov 29, 2026

Copy link
Copy Markdown

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:

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

Checked for overlap

…r change

`cargo clippy --workspace --all-targets --locked -- -D warnings` (CI gate 1)
has 38 findings on main. trustno1-coder#2019 clears the five in victory-loader and
victory-shader, trustno1-coder#2486 four in victory-gpu (font.rs's second '%', which
clippy reports twice, `busy`, `adapter`). This clears the other 29, so
with the three in, the gate has none.

Written as clippy asks (same behaviour):
- shader_cache.rs: unused `AtomicBool` import
- panel.rs, pipeline/library.rs: `is_multiple_of`
- list.rs: `handles` is already a slice
- resource.rs: `unwrap_or` for a plain `match` on a local
- gameinput.rs (2): `then_some`
- compose.rs: `Composer::record` takes its eight arguments (allowed, as
  elsewhere in the tree)
- streamline.rs: the buffer-count test is a `const` assertion
- lib.rs, lifecycle.rs: the item after the test module moves above it
- Cargo.toml: rust-version 1.89, which the code already needs
  (`File::try_lock` in pipeline/library.rs; the toolchain is 1.98.1)

Unused since the 11.29.01 merge, kept and marked `#[allow(dead_code)]`
with a note, not deleted, so whoever wires them back has them:
Host::fetch_buffer with fetchmem::{sizes, buffer}, take_spare_wb,
flush_all's MANY_CHUNK and its ahead snapshot, Shadow::nothing_new_with
and watch::nothing_new_with, shadow::wide_chunk,
HostHeap::mirror_for_pass, recycle::Kind::Card, memory::lock_memory,
make::Queue::pop, and create_loose_compute with loose_compute,
fspx_container and MAX_LOOSE_PART.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the pr-fix Pull request: fixes a bug label Nov 29, 2026
@github-actions github-actions Bot changed the title [pr-fix] Clippy: main's other 29 victory-gpu and victory-hle findings (with #2019 and #2486, the gate is clean) Clippy: main's other 29 victory-gpu and victory-hle findings (with #2019 and #2486, the gate is clean) Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-fix Pull request: fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant