GPU: clippy passes again on the warnings in victory-gpu #982

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

@⁠brunofgmag on GitHub · 2026-11-25 14:55 UTC · original
brunofgmag:fx-clippy → main · +12 −12 · 7 files · 1 commits · open

The CI on main has failed at the Clippy step since f85101b. This branch now starts from the current main (ca8829f), and both clippy commands from the workflow pass on it, with the default features and with --all-features.

  • resource.rs: placed_filler_twins is only read by diagnostics builds, so it is now compiled only with the diagnostics feature.
  • draw.rs: the scissor census sorts with sort_unstable_by_key and Reverse.
  • indirect.rs: the test rig's depth_written handle is kept but never read again, so it is now _depth_written.
  • fpsbox.rs: the text cache fills a vacant entry through entry instead of contains_key followed by insert.
  • draw.rs, queue.rs, shadow.rs (two places) and watch.rs (two places): x % n == 0 becomes x.is_multiple_of(n).

Nothing changes in behaviour. Thanks to the independent check in the comments, which listed the findings on the newer main.

**@⁠brunofgmag** on GitHub · 2026-11-25 14:55 UTC · [original](https://github.com/fxceless/victory-fork/pull/982) `brunofgmag:fx-clippy` → `main` · +12 −12 · 7 files · 1 commits · open The CI on main has failed at the Clippy step since f85101b. This branch now starts from the current main (ca8829f), and both clippy commands from the workflow pass on it, with the default features and with `--all-features`. - `resource.rs`: `placed_filler_twins` is only read by diagnostics builds, so it is now compiled only with the `diagnostics` feature. - `draw.rs`: the scissor census sorts with `sort_unstable_by_key` and `Reverse`. - `indirect.rs`: the test rig's `depth_written` handle is kept but never read again, so it is now `_depth_written`. - `fpsbox.rs`: the text cache fills a vacant entry through `entry` instead of `contains_key` followed by `insert`. - `draw.rs`, `queue.rs`, `shadow.rs` (two places) and `watch.rs` (two places): `x % n == 0` becomes `x.is_multiple_of(n)`. Nothing changes in behaviour. Thanks to the independent check in the comments, which listed the findings on the newer main.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:55:08 +00:00
Author
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 15:51 UTC · original

Independent Windows-target Clippy check for head 119d6575eb22847cb634fc9d33dd6df2743fafca, using Rust/Clippy 1.98.1 on Linux.

cargo clippy --locked -p victory-gpu --all-targets --target x86_64-pc-windows-msvc --features blake3/pure -- -D warnings
cargo clippy --locked -p victory-gpu --all-targets --target x86_64-pc-windows-msvc --features blake3/pure,diagnostics -- -D warnings
Source Default Diagnostics
PR base 0b0074e 4 findings 3 findings
PR head 119d657 Pass Pass
Current main 3973179 5 findings 7 findings
Current main with this patch applied locally 1 finding 4 findings

Counts are distinct source locations. The exact base reproduced the unused helper, unused test field, descending sort and modulo findings. The helper finding appeared only in the default configuration.

On current main, the patch removes all four targeted findings. The shadow hunk needs refreshed context because main updated the adjacent log message. The remaining findings on that snapshot are also present in unpatched main. They are manual_is_multiple_of at queue.rs:672 in both configurations and at draw.rs:3235 and watch.rs:481,872 with diagnostics.

GitHub's advertised test merge 001f128 has the same tree as the PR head and uses 0b0074e as its first parent. The GitHub workflow run required action and started zero jobs. The local check cross-compiled for Clippy and used blake3/pure to avoid the native MSVC assembler dependency. Native Windows linking and execution were outside this check.

**@⁠avt0m4t48** on GitHub · 2026-11-25 15:51 UTC · [original](https://github.com/fxceless/victory-fork/pull/982#issuecomment-7167372061) Independent Windows-target Clippy check for head `119d6575eb22847cb634fc9d33dd6df2743fafca`, using Rust/Clippy 1.98.1 on Linux. ```sh cargo clippy --locked -p victory-gpu --all-targets --target x86_64-pc-windows-msvc --features blake3/pure -- -D warnings cargo clippy --locked -p victory-gpu --all-targets --target x86_64-pc-windows-msvc --features blake3/pure,diagnostics -- -D warnings ``` | Source | Default | Diagnostics | | --- | --- | --- | | PR base `0b0074e` | 4 findings | 3 findings | | PR head `119d657` | Pass | Pass | | Current main `3973179` | 5 findings | 7 findings | | Current main with this patch applied locally | 1 finding | 4 findings | Counts are distinct source locations. The exact base reproduced the unused helper, unused test field, descending sort and modulo findings. The helper finding appeared only in the default configuration. On current main, the patch removes all four targeted findings. The shadow hunk needs refreshed context because main updated the adjacent log message. The remaining findings on that snapshot are also present in unpatched main. They are `manual_is_multiple_of` at `queue.rs:672` in both configurations and at `draw.rs:3235` and `watch.rs:481,872` with diagnostics. GitHub's advertised test merge `001f128` has the same tree as the PR head and uses `0b0074e` as its first parent. The [GitHub workflow run](https://github.com/fxceless/victory-fork/actions/runs/45639339580) required action and started zero jobs. The local check cross-compiled for Clippy and used `blake3/pure` to avoid the native MSVC assembler dependency. Native Windows linking and execution were outside this check.
Author
Owner

@⁠Dathinel on GitHub · 2026-11-25 23:10 UTC · original

Retested on Windows with Rust/Clippy 1.98.1, main 6d20eed plus this head (c47b418) and the test-only #1092. The merge is clean. Both CI Clippy commands now report just two remaining diagnostics, both in victory-gpu:

  • pipeline/library.rs:509: combine the rejected-library check, directory lookup and failed rename into one let-chain. Keep the rename after the rejected and directory guards.
  • watch.rs:749: use (CALLS.fetch_add(1, Ordering::Relaxed) + 1).is_multiple_of(65_536), preserving the increment before the check.

I applied those two edits locally (3 additions, 4 deletions). Both workspace Clippy commands from ci.yml then passed with -D warnings, including --all-targets --all-features. Current main by itself fails the hosted Clippy job: https://github.com/fxceless/victory-fork/actions/runs/45718141122 . AI-assisted.

**@⁠Dathinel** on GitHub · 2026-11-25 23:10 UTC · [original](https://github.com/fxceless/victory-fork/pull/982#issuecomment-7177234273) Retested on Windows with Rust/Clippy 1.98.1, main 6d20eed plus this head (c47b418) and the test-only #1092. The merge is clean. Both CI Clippy commands now report just two remaining diagnostics, both in victory-gpu: - pipeline/library.rs:509: combine the rejected-library check, directory lookup and failed rename into one let-chain. Keep the rename after the rejected and directory guards. - watch.rs:749: use (CALLS.fetch_add(1, Ordering::Relaxed) + 1).is_multiple_of(65_536), preserving the increment before the check. I applied those two edits locally (3 additions, 4 deletions). Both workspace Clippy commands from ci.yml then passed with -D warnings, including --all-targets --all-features. Current main by itself fails the hosted Clippy job: https://github.com/fxceless/victory-fork/actions/runs/45718141122 . AI-assisted.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/fpsbox.rs
  • crates/victory-gpu/src/indirect.rs
  • crates/victory-gpu/src/resource.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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