Shaders: gate the constant_color test helper to Windows #685

Manually merged
github merged 1 commit from gh-pr/685/head into gh-pr/685/base 2026-11-26 04:13:00 +00:00
Owner

@⁠catminou4 on GitHub · 2026-11-24 06:50 UTC · original
catminou4:devin/constant-color-cfg-windows → main · +1 −0 · 1 files · 1 commits · merged 2026-11-24 08:23 UTC

Summary

constant_color() in crates/victory-shader/src/emit/mod.rs is only called by two tests that are themselves #[cfg(windows)] (stub_pipeline_is_created, constant_color_validates). On macOS and Linux the helper compiles but is dead code, so cargo check -p victory-shader --all-targets warns:

warning: function `constant_color` is never used

This gates the helper with #[cfg(windows)], matching its callers — one line, no behavior change on Windows.

Verification

On macOS 26 arm64, rustc 1.98.1, base main (d2a4bae):

  • before: warning: function constant_color is never used in lib test
  • after: warning gone (cargo check -p victory-shader --all-targets --locked clean)
  • cargo test -p victory-shader --locked: 56 passed, 0 failed (unchanged)

The Windows-only tests that use the helper are unaffected (still compiled there).

**@⁠catminou4** on GitHub · 2026-11-24 06:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/685) `catminou4:devin/constant-color-cfg-windows` → `main` · +1 −0 · 1 files · 1 commits · merged 2026-11-24 08:23 UTC ## Summary `constant_color()` in `crates/victory-shader/src/emit/mod.rs` is only called by two tests that are themselves `#[cfg(windows)]` (`stub_pipeline_is_created`, `constant_color_validates`). On macOS and Linux the helper compiles but is dead code, so `cargo check -p victory-shader --all-targets` warns: ``` warning: function `constant_color` is never used ``` This gates the helper with `#[cfg(windows)]`, matching its callers — one line, no behavior change on Windows. ## Verification On macOS 26 arm64, rustc 1.98.1, base `main` (`d2a4bae`): - before: `warning: function constant_color is never used` in lib test - after: warning gone (`cargo check -p victory-shader --all-targets --locked` clean) - `cargo test -p victory-shader --locked`: 56 passed, 0 failed (unchanged) The Windows-only tests that use the helper are unaffected (still compiled there).
Its only callers (stub_pipeline_is_created, constant_color_validates)
are #[cfg(windows)], so on macOS/Linux the helper is dead code and
cargo check --all-targets warns 'function constant_color is never used'.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:12:59 +00:00
github manually merged commit ab3eb92941 into gh-pr/685/base 2026-11-26 04:13:00 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!685
No description provided.