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

Open
brunofgmag wants to merge 1 commit from upstream-pr/982 into main
brunofgmag commented 2026-11-25 14:55:12 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by brunofgmag on 2026-11-25T14:55:12Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6607303268 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/982). Originally posted by [brunofgmag](https://github.com/brunofgmag) on 2026-11-25T14:55:12Z. --- 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.
avt0m4t48 commented 2026-11-25 16:12:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-25T15:51:20Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7167372061 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/982#issuecomment-7167372061). Originally posted by [avt0m4t48](https://github.com/avt0m4t48) on 2026-11-25T15:51:20Z. --- 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.
upstream-sync changed title from [PR #982] GPU: clippy passes again on the four warnings in victory-gpu to [PR #982] GPU: clippy passes again on the warnings in victory-gpu 2026-11-25 18:04:59 +00:00
Dathinel commented 2026-11-26 00:06:07 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Dathinel on 2026-11-25T23:10:46Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7177234273 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/982#issuecomment-7177234273). Originally posted by [Dathinel](https://github.com/Dathinel) on 2026-11-25T23:10:46Z. --- 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 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/982:upstream-pr/982'
git switch 'upstream-pr/982'

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/982'
git switch 'upstream-pr/982'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/982'
git switch 'upstream-pr/982'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/982'
git switch 'main'
git merge --squash 'upstream-pr/982'
git switch 'main'
git merge --ff-only 'upstream-pr/982'
git switch 'main'
git merge 'upstream-pr/982'
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
fxceless/victory-fork!980
No description provided.