ci: fix workspace clippy -D warnings failures across default and diagnostics builds #3560

Closed
github-bot wants to merge 1 commit from github-bot/gh-3560 into main AGit
Owner

@⁠Gauss999 on GitHub · 2026-11-30 01:02 UTC · original
Gauss999:fix/ci-clippy → main · +61 −42 · 23 files · 1 commits · closed without merging

What it changes

Fixes the pre-existing cargo clippy ... -- -D warnings errors on main (41adb551) across both default and --all-features (diagnostics) builds so the CI Clippy and Clippy, diagnostics build steps can pass cleanly:

  • Structural / unreachable code:
    • crates/victory-gpu/src/host/font.rs: remove unreachable duplicate b'%' match arm.
    • crates/victory-gpu/src/lib.rs, crates/victory-hle/src/modules/lifecycle.rs: move items (set_range_lock re-export, keys_or_mouse) before #[cfg(test)] mod ... (clippy::items-after-test-module).
    • crates/victory-gpu/src/pipeline/library.rs: add #[allow(clippy::incompatible_msrv)] on file.try_lock() (workspace MSRV is 1.88, toolchain is 1.98.1) and use .is_multiple_of(500).
  • Unused imports, variables, borrows, and lints:
    • Remove unused imports (AtomicBool in shader_cache.rs, PAIR_MEETINGS in analysis.rs, unused lane_regions re-export in lower.rs).
    • Remove unused ahead_snap binding in host.rs, prefix unused _busy (resource.rs) and _adapter (streamline.rs), drop redundant borrows (&list, &l, &cmds, &handles), replace unwrap_or_else with unwrap_or (resource.rs), then with then_some (gameinput.rs), x % 2 == 0 with x.is_multiple_of(2) (host/panel.rs), while loads with if loads { loop { ... } } (analysis.rs), constant assert! with const { assert!(...) } (streamline.rs), and add #[allow(clippy::too_many_arguments)] on compose::Compositor::record and native::tests::record.
  • Dead-code annotations without removing intentional helpers:
    • #[cfg_attr(not(feature = "diagnostics"), allow(dead_code))] on victory_loader::crash::unwind_copy, #[cfg_attr(not(test), allow(dead_code))] on host::take_spare_wb, and #[allow(dead_code)] on kept helpers in host.rs, host/recycle.rs, descriptor/host.rs, pipeline.rs, pipeline/make.rs, memory.rs, shadow.rs, and watch.rs.

Validation

  • cargo clippy --workspace --all-targets --locked -- -D warnings: passed (exit 0)
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passed (exit 0)
  • cargo xtask policy --staged: passed (23 files ok)
  • Targeted tests for modified modules: victory-hle modules::gameinput (84 passed), modules::lifecycle (15 passed), victory-loader (75 + 2 + 2 passed)
**@⁠Gauss999** on GitHub · 2026-11-30 01:02 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3560) `Gauss999:fix/ci-clippy` → `main` · +61 −42 · 23 files · 1 commits · closed without merging ## What it changes Fixes the pre-existing `cargo clippy ... -- -D warnings` errors on `main` (`41adb551`) across both default and `--all-features` (`diagnostics`) builds so the CI `Clippy` and `Clippy, diagnostics build` steps can pass cleanly: - **Structural / unreachable code:** - `crates/victory-gpu/src/host/font.rs`: remove unreachable duplicate `b'%'` match arm. - `crates/victory-gpu/src/lib.rs`, `crates/victory-hle/src/modules/lifecycle.rs`: move items (`set_range_lock` re-export, `keys_or_mouse`) before `#[cfg(test)] mod ...` (`clippy::items-after-test-module`). - `crates/victory-gpu/src/pipeline/library.rs`: add `#[allow(clippy::incompatible_msrv)]` on `file.try_lock()` (workspace MSRV is `1.88`, toolchain is `1.98.1`) and use `.is_multiple_of(500)`. - **Unused imports, variables, borrows, and lints:** - Remove unused imports (`AtomicBool` in `shader_cache.rs`, `PAIR_MEETINGS` in `analysis.rs`, unused `lane_regions` re-export in `lower.rs`). - Remove unused `ahead_snap` binding in `host.rs`, prefix unused `_busy` (`resource.rs`) and `_adapter` (`streamline.rs`), drop redundant borrows (`&list`, `&l`, `&cmds`, `&handles`), replace `unwrap_or_else` with `unwrap_or` (`resource.rs`), `then` with `then_some` (`gameinput.rs`), `x % 2 == 0` with `x.is_multiple_of(2)` (`host/panel.rs`), `while loads` with `if loads { loop { ... } }` (`analysis.rs`), constant `assert!` with `const { assert!(...) }` (`streamline.rs`), and add `#[allow(clippy::too_many_arguments)]` on `compose::Compositor::record` and `native::tests::record`. - **Dead-code annotations without removing intentional helpers:** - `#[cfg_attr(not(feature = "diagnostics"), allow(dead_code))]` on `victory_loader::crash::unwind_copy`, `#[cfg_attr(not(test), allow(dead_code))]` on `host::take_spare_wb`, and `#[allow(dead_code)]` on kept helpers in `host.rs`, `host/recycle.rs`, `descriptor/host.rs`, `pipeline.rs`, `pipeline/make.rs`, `memory.rs`, `shadow.rs`, and `watch.rs`. ## Validation - `cargo clippy --workspace --all-targets --locked -- -D warnings`: passed (exit 0) - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: passed (exit 0) - `cargo xtask policy --staged`: passed (`23 files ok`) - Targeted tests for modified modules: `victory-hle` `modules::gameinput` (84 passed), `modules::lifecycle` (15 passed), `victory-loader` (75 + 2 + 2 passed)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 01:03:16 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:51 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:51 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3560#issuecomment-7321676403) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
github-bot closed this pull request 2026-12-01 18:58:21 +00:00

Pull request closed

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/trustno1-coder--VIctory-NVIDIA!3560
No description provided.