Turn five of the switched-off style lints back on #43

Open
viktoschi wants to merge 1 commit from upstream-pr/43 into main
viktoschi commented 2026-11-24 20:49:55 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by viktoschi on 2026-11-24T20:49:55Z.


What this does

Five of the style lints the workspace switched off "until the newer code is
tidied" are back on. Six call sites did the work; no behaviour changes.

Lint Site Change
chunks_exact_to_as_chunks shadow.rs:857, :871 one half of the pair already used as_chunks::<8>(); the other half does now
chunks_exact_to_as_chunks pipeline/library.rs:772 as_chunks_mut::<4>()
implicit_saturating_sub shadow.rs:421 saturating_sub
sliced_string_as_bytes draw.rs:282 slice the byte view, not the string
manual_clamp, min_max indirect.rs:1034 see below

The interesting one

The window test expected

[groups, u32::from(groups > 0).max(1).min(1), 1, 0xAB00 + i]

.max(1).min(1) is always 1, so that assertion could not fail. Written as the
real value first, it did fail:

filled record 1, ahead true
left:  [0, 1, 1, 43777]
right: [0, 0, 1, 43777]

A slot that was copied carries 1 even when it has no groups — the flag
means "this record is filled", not "this record has work". The assertion is a
literal 1 now, with a comment saying exactly that, so the next person does
not read it as a group-count check.

collapsible_match stays off, and the comment now says why: collapsing the
Unordered arm in draw.rs into a match guard would skip the diagnostics
note_target call above it whenever the depth twin handles the write.

Checks

  • cargo clippy --workspace --all-targets --locked -- -D warnings — clean
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings — clean
  • cargo test --workspace --locked — 496 passed, 0 failed, 7 ignored (GPU tests on an RTX 3090)
  • cargo test --workspace --all-features --locked — green as well
  • pre-commit asset policy — 5 files ok
<!-- greyfinch-sync:fxceless/victory-fork:issue:6591132447 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/43). Originally posted by [viktoschi](https://github.com/viktoschi) on 2026-11-24T20:49:55Z. --- ## What this does Five of the style lints the workspace switched off "until the newer code is tidied" are back on. Six call sites did the work; no behaviour changes. | Lint | Site | Change | | --- | --- | --- | | `chunks_exact_to_as_chunks` | `shadow.rs:857`, `:871` | one half of the pair already used `as_chunks::<8>()`; the other half does now | | `chunks_exact_to_as_chunks` | `pipeline/library.rs:772` | `as_chunks_mut::<4>()` | | `implicit_saturating_sub` | `shadow.rs:421` | `saturating_sub` | | `sliced_string_as_bytes` | `draw.rs:282` | slice the byte view, not the string | | `manual_clamp`, `min_max` | `indirect.rs:1034` | see below | ### The interesting one The window test expected ```rust [groups, u32::from(groups > 0).max(1).min(1), 1, 0xAB00 + i] ``` `.max(1).min(1)` is always 1, so that assertion could not fail. Written as the real value first, it did fail: ``` filled record 1, ahead true left: [0, 1, 1, 43777] right: [0, 0, 1, 43777] ``` A slot that was copied carries **1 even when it has no groups** — the flag means "this record is filled", not "this record has work". The assertion is a literal `1` now, with a comment saying exactly that, so the next person does not read it as a group-count check. `collapsible_match` stays off, and the comment now says why: collapsing the `Unordered` arm in `draw.rs` into a match guard would skip the diagnostics `note_target` call above it whenever the depth twin handles the write. ## Checks - `cargo clippy --workspace --all-targets --locked -- -D warnings` — clean - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` — clean - `cargo test --workspace --locked` — **496 passed, 0 failed, 7 ignored** (GPU tests on an RTX 3090) - `cargo test --workspace --all-features --locked` — green as well - pre-commit asset policy — 5 files ok
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/43:upstream-pr/43'
git switch 'upstream-pr/43'

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