lint: re-enable six relaxed clippy lints across gpu and shader crates #649

Open
JulioMelo259 wants to merge 3 commits from upstream-pr/649 into main
JulioMelo259 commented 2026-11-25 03:59:40 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by JulioMelo259 on 2026-11-25T03:59:40Z.


Follow-up to #499 and the clippy-lint alignment noted in #126.

Re-enables six of the remaining relaxed lints in the workspace Cargo.toml (leaving undocumented_unsafe_blocks to #499, and leaving type_complexity / sliced_string_as_bytes untouched for now to avoid merge conflicts with hot files emit/lower.rs, draw.rs, and host.rs):

  • collapsible_match (already clean)
  • manual_clamp & min_max — simplified constant u32::from(groups > 0).max(1).min(1) to 1 in crates/victory-gpu/src/indirect.rs test assertion
  • implicit_saturating_sub — replaced manual check with saturating_sub in crates/victory-gpu/src/shadow.rs
  • chunks_exact_to_as_chunks — switched to as_chunks / as_chunks_mut in crates/victory-gpu/src/shadow.rs and crates/victory-gpu/src/pipeline/library.rs
  • needless_range_loop — converted indexed loops to slice/iterator patterns in crates/victory-gpu/src/shadow.rs, crates/victory-shader/src/emit/own_bits.rs, and crates/victory-shader/src/ir.rs

Validation

  • cargo clippy --workspace --all-targets --all-features — 0 warnings
  • cargo test --workspace — 505 passed, 0 failed (8 ignored)
  • cargo xtask policy — 169 files ok

AI-assisted (Gemini Neon + Oh My Pi + manual review/fixes), per fork convention.

<!-- greyfinch-sync:fxceless/victory-fork:issue:5484916893 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/649). Originally posted by [JulioMelo259](https://github.com/JulioMelo259) on 2026-11-25T03:59:40Z. --- Follow-up to #499 and the clippy-lint alignment noted in #126. Re-enables six of the remaining relaxed lints in the workspace `Cargo.toml` (leaving `undocumented_unsafe_blocks` to #499, and leaving `type_complexity` / `sliced_string_as_bytes` untouched for now to avoid merge conflicts with hot files `emit/lower.rs`, `draw.rs`, and `host.rs`): - `collapsible_match` (already clean) - `manual_clamp` & `min_max` — simplified constant `u32::from(groups > 0).max(1).min(1)` to `1` in `crates/victory-gpu/src/indirect.rs` test assertion - `implicit_saturating_sub` — replaced manual check with `saturating_sub` in `crates/victory-gpu/src/shadow.rs` - `chunks_exact_to_as_chunks` — switched to `as_chunks` / `as_chunks_mut` in `crates/victory-gpu/src/shadow.rs` and `crates/victory-gpu/src/pipeline/library.rs` - `needless_range_loop` — converted indexed loops to slice/iterator patterns in `crates/victory-gpu/src/shadow.rs`, `crates/victory-shader/src/emit/own_bits.rs`, and `crates/victory-shader/src/ir.rs` ### Validation - `cargo clippy --workspace --all-targets --all-features` — 0 warnings - `cargo test --workspace` — 505 passed, 0 failed (8 ignored) - `cargo xtask policy` — 169 files ok AI-assisted (Gemini Neon + Oh My Pi + manual review/fixes), per fork convention.
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/649:upstream-pr/649'
git switch 'upstream-pr/649'

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