D3D12-CLIPPY-NON-GPU-CRATES: fix all clippy warnings across non-gpu d3d12 crates #2681

Merged
bobcatchris merged 1 commit from upstream-pr/2681 into main 2026-12-01 10:38:46 +00:00
bobcatchris commented 2026-11-30 02:08:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-11-30T02:08:56Z.


Claimed in #2570 as D3D12-CLIPPY-NON-GPU-CRATES (#issuecomment-7259844267, ref #issuecomment-7248543083 / CI-D3D12-CARGO-TEST).

What and why

Fixes all clippy warnings across the non-leonida-gpu crates in d3d12/ (leonida-core, leonida-formats, leonida-game, leonida-hle, leonida-loader, leonida-lua, leonida-menu, leonida-pe, leonida-pipeline, leonida-shader, and apps/leonida) using real idiomatic fixes with zero #[allow] suppressions, directly unblocking cargo clippy --all-targets -- -D warnings for d3d12/ CI.

Verification (Red -> Green)

Hardware / OS: native Windows 11 Pro (10.0.26200), pinned toolchain rustc 1.98.1 (d3d12/rust-toolchain.toml).

  • Rebased cleanly onto main (40e7fe69d).
  • cargo clippy -p leonida-core -p leonida-formats -p leonida-game -p leonida-loader -p leonida-lua -p leonida-menu -p leonida-pe -p leonida-pipeline -p leonida-shader -p leonida-hle -p leonida --no-deps --all-targets -- -D warnings — 0 warnings / PASS (19.87s).
  • python -I scripts/check_no_game_data.py on all touched files — PASS.

AI-assisted: Antigravity (Gemini 4 Neon)

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5557709013 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2681). Originally posted by [bobcatchris](https://github.com/bobcatchris) on 2026-11-30T02:08:56Z. --- Claimed in #2570 as `D3D12-CLIPPY-NON-GPU-CRATES` (`#issuecomment-7259844267`, ref `#issuecomment-7248543083` / `CI-D3D12-CARGO-TEST`). ### What and why Fixes all clippy warnings across the non-`leonida-gpu` crates in `d3d12/` (`leonida-core`, `leonida-formats`, `leonida-game`, `leonida-hle`, `leonida-loader`, `leonida-lua`, `leonida-menu`, `leonida-pe`, `leonida-pipeline`, `leonida-shader`, and `apps/leonida`) using real idiomatic fixes with **zero `#[allow]` suppressions**, directly unblocking `cargo clippy --all-targets -- -D warnings` for `d3d12/` CI. ### Verification (Red -> Green) Hardware / OS: native Windows 11 Pro (`10.0.26200`), pinned toolchain `rustc 1.98.1` (`d3d12/rust-toolchain.toml`). - Rebased cleanly onto `main` (`40e7fe69d`). - `cargo clippy -p leonida-core -p leonida-formats -p leonida-game -p leonida-loader -p leonida-lua -p leonida-menu -p leonida-pe -p leonida-pipeline -p leonida-shader -p leonida-hle -p leonida --no-deps --all-targets -- -D warnings` — **0 warnings / PASS** (`19.87s`). - `python -I scripts/check_no_game_data.py` on all touched files — **PASS**. AI-assisted: Antigravity (Gemini 4 Neon)
Kal0s-design commented 2026-11-30 12:58:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-11-30T12:58:02Z.


Independent Windows check of 913e68b48 on current main 497bdd039 (clean merge, 368b11621). Native Windows 11, MSVC x64, Rust 1.98.1, the exact cargo clippy ... --no-deps --all-targets -- -D warnings from the description (the 11 crates).

  • main: exit 101, 25 errors; leonida-lua, leonida-shader (lib and tests), leonida-loader, leonida-menu and leonida-formats tests don't compile under -D warnings.
  • This PR: exit 0, no clippy warning in those crates. The only warnings printed are 17 rustc lints in leonida-gpu (a dependency here, so outside this run's -D warnings), which #2682 covers.
  • Tests are unchanged by the edits: cargo test over the same crates except leonida-shader (whose GPU suite takes minutes here) gives 536 passed, 0 failed, 9 ignored on both main and the merge.

Not covered: leonida-shader's test suite on the merge, and leonida-gpu (#2682).

GPUs tested: n/a (lints and CPU tests). AI-assisted: yes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7279168588 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2681#issuecomment-7279168588). Originally posted by [Kal0s-design](https://github.com/Kal0s-design) on 2026-11-30T12:58:02Z. --- **Independent Windows check** of `913e68b48` on current `main` `497bdd039` (clean merge, `368b11621`). Native Windows 11, MSVC x64, Rust 1.98.1, the exact `cargo clippy ... --no-deps --all-targets -- -D warnings` from the description (the 11 crates). - `main`: exit 101, 25 errors; `leonida-lua`, `leonida-shader` (lib and tests), `leonida-loader`, `leonida-menu` and `leonida-formats` tests don't compile under `-D warnings`. - This PR: exit 0, no clippy warning in those crates. The only warnings printed are 17 rustc lints in `leonida-gpu` (a dependency here, so outside this run's `-D warnings`), which #2682 covers. - Tests are unchanged by the edits: `cargo test` over the same crates except `leonida-shader` (whose GPU suite takes minutes here) gives 536 passed, 0 failed, 9 ignored on both `main` and the merge. Not covered: `leonida-shader`'s test suite on the merge, and `leonida-gpu` (#2682). GPUs tested: n/a (lints and CPU tests). AI-assisted: yes.
KelboLive commented 2026-11-30 15:59:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T15:59:26Z.


Independent check on Windows (not the author), at 913e68b48.

  • cargo clippy --locked --workspace --exclude leonida-gpu --all-targets --no-deps -- -D warnings: exit 0 (40 s).
  • leonida-gpu still emits its 17 warnings as a dependency here; that is #2682's scope, not this PR's.

Environment: Ryzen 9 7950X3D, Windows 11 Pro 10.0.26200.9711, Rust 1.98.1 pinned.

AI-assisted: yes (opencode).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7283938227 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2681#issuecomment-7283938227). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-30T15:59:26Z. --- Independent check on Windows (not the author), at `913e68b48`. - `cargo clippy --locked --workspace --exclude leonida-gpu --all-targets --no-deps -- -D warnings`: **exit 0** (40 s). - `leonida-gpu` still emits its 17 warnings as a dependency here; that is #2682's scope, not this PR's. Environment: Ryzen 9 7950X3D, Windows 11 Pro 10.0.26200.9711, Rust 1.98.1 pinned. AI-assisted: yes (opencode).
aslan2142 commented 2026-12-01 10:38:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T10:38:18Z.

Review: APPROVED


Reviewed all 20 touched files line-by-line: clean, idiomatic Clippy fixes across the non-leonida-gpu crates in d3d12/ with zero #[allow] suppressions, matching the pinned Rust 1.98.1 toolchain (d3d12/rust-toolchain.toml). Independently verified across multiple environments to pass cargo clippy --no-deps --all-targets -- -D warnings, clean-room verified, and all CI checks are green. Merging.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6129573691 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2681#pullrequestreview-6129573691). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T10:38:18Z. **Review:** APPROVED --- Reviewed all 20 touched files line-by-line: clean, idiomatic Clippy fixes across the non-`leonida-gpu` crates in `d3d12/` with zero `#[allow]` suppressions, matching the pinned Rust 1.98.1 toolchain (`d3d12/rust-toolchain.toml`). Independently verified across multiple environments to pass `cargo clippy --no-deps --all-targets -- -D warnings`, clean-room verified, and all CI checks are green. Merging. *(AI-assisted review.)*
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
ProjectLeonida/mandy!2681
No description provided.