chore(gpu): unwrap the clamp signature switch that is always Some #421

Manually merged
github merged 1 commit from github-bot/gh-421 into main 2026-12-04 03:42:18 +00:00 AGit
Owner

@⁠Luxuride on GitHub · 2026-12-04 01:46 UTC · original
Luxuride:chore/gpu-drop-true-then → main · +1 −3 · 1 files · 1 commits · merged 2026-12-04 03:41 UTC

What

crates/victory-gpu/src/indirect.rs:720-722:

let signature = (&true)
    .then(|| crate::draw::host_signature(2, 12))
    .flatten();

(&true).then(..) is Some(..), so this is just crate::draw::host_signature(2, 12) behind three lines of indirection that suggest the clamp root signature is optional here. It is not: there is no constant, env switch or comment making it conditional.

Validation

cargo clippy -p victory-gpu --target x86_64-pc-windows-msvc --lib -- -D clippy::needless_borrow
errors
main 2 (indirect.rs:720, pipeline/library.rs:445)
this branch 1 (pipeline/library.rs:445, fixed in another PR)

The type stays Option<…> (host_signature returns one), so no caller changes.

Overlap check

crates/victory-gpu/src/indirect.rs appears in no open PR's file list, and no issue mentions this line.

**@⁠Luxuride** on GitHub · 2026-12-04 01:46 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/421) `Luxuride:chore/gpu-drop-true-then` → `main` · +1 −3 · 1 files · 1 commits · merged 2026-12-04 03:41 UTC ## What `crates/victory-gpu/src/indirect.rs:720-722`: ```rust let signature = (&true) .then(|| crate::draw::host_signature(2, 12)) .flatten(); ``` `(&true).then(..)` is `Some(..)`, so this is just `crate::draw::host_signature(2, 12)` behind three lines of indirection that suggest the clamp root signature is optional here. It is not: there is no constant, env switch or comment making it conditional. ## Validation ``` cargo clippy -p victory-gpu --target x86_64-pc-windows-msvc --lib -- -D clippy::needless_borrow ``` | | errors | |---|---| | `main` | 2 (`indirect.rs:720`, `pipeline/library.rs:445`) | | this branch | 1 (`pipeline/library.rs:445`, fixed in another PR) | The type stays `Option<…>` (`host_signature` returns one), so no caller changes. ## Overlap check `crates/victory-gpu/src/indirect.rs` appears in no open PR's file list, and no issue mentions this line.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 01:49:37 +00:00
github manually merged commit e2ae32b16b into main 2026-12-04 03:42:18 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.