fix(build): locked Clippy passes on Windows again #388
No reviewers
Labels
No labels
area/build
area/install
area/mods
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!388
Loading…
Reference in a new issue
No description provided.
Delete branch "llun/LongshotLauncher:fix/windows-clippy-dead-code"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On Windows,
cargo clippy --locked --workspace --all-targets -- -D warningsfails onmain. Two items are only used on Linux, so a Windows build reports them unused. #344 and #387 had to work around this with-A unused-imports -A dead_code.src/game/process.rs: only the Unix pipe readers useAtomicBool. It is now imported in its own#[cfg(unix)]line, and the sharedstd::syncimport keepsAtomicU8andOrdering.src/graphics_driver.rs: onlygraphics_driver/linux.rsreadsGpu::nvidia_proprietaryandGpu::info(added in #384). They now carry#[cfg_attr(not(target_os = "linux"), allow(dead_code))]with a note saying only Linux reads them, the same wayvendoranddevicealready do off Windows. The fields stay in the struct, sographics_driver/windows.rsstill builds them without changes.No behaviour change. Linux compiles exactly what it compiled before: the import is still there under
cfg(unix), and the allow does nothing on Linux.Tested
Windows 11, the pinned toolchain (Rust 1.99.1, clippy 0.1.99):
cargo clippy --locked --workspace --all-targets -- -D warnings: onmain(1fb2537) it fails withunused import: AtomicBool(src/game/process.rs:16) andfields `nvidia_proprietary` and `info` are never read(src/graphics_driver.rs:42). With this branch it passes.cargo fmt --check(edition 2024): clean.Not run here: Clippy on Linux. CI covers it.
🤖 Generated with Claude Code
@review
Recommendation: Approve. The reported Windows Clippy run passes with these changes, which leave runtime behavior unchanged. The Linux CI checks are still running. Nothing blocking is left. Recommend approval; not approved on the forge.
This restores the strict Windows Clippy check by gating a Unix-only import and allowing two Linux-only field reads to be unused elsewhere. It adds no runtime cost.
Checks: Still running: 5 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes: the PR reports that locked workspace Clippy fails on the base with the two named warnings and passes on this branch on Windows 11. This is not a performance change.
Other systems: Linux retains the AtomicBool import and does not apply the new dead-code allowances. Windows retains both GPU fields and their initialization; no runtime paths change.
Switches: None.
Reviewed:
d0cd7a6d61against1fb25370b1: Read AGENTS.md, CONTRIBUTING.md, the commit, both changed files and the relevant platform-specific uses. Skimmed the platform driver modules and CI workflow. No review checklist or pull request template was found at the specified paths.; nothing run (a code review).Checked and fine:
Testing: The author reports Windows Clippy and formatting passed. Linux CI is still running; no commands from the project were run during review.
Overlaps and merge order: Not checked; network access is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
HumanBean referenced this pull request2026-12-01 18:35:01 +00:00