leonida-gpu: clippy -D warnings is clean again (4 lints from #3439 and #3445) #3453

Merged
leonida/mandy
MoonEyes merged 2 commits from fix/clippy-leonida-gpu into main 2026-12-04 12:57:13 +00:00

Pull request successfully merged and closed

Member

Change

cargo clippy -p leonida-gpu --locked --all-targets -- -D warnings failed on main with 4 errors (from #3439 and #3445, reported by OreoFR's agent). Fixed without changing behaviour:

  • ValueWait::engine() (unused accessor) removed; the engine field stays, it is still filled, logged and counted.
  • wait_for takes a small ValueWaitCall struct instead of 8 arguments, built by wait_value/wait_value64 (fields by name, same types; entry and measure_call! unchanged; the 64-bit wait still has no mask).
  • list/values.rs:249: !who.modelled(false) instead of == false.
  • descriptor.rs:464: parts bound directly in both branches; order of written.take / told unchanged.

Tests

  • cargo clippy -p leonida-gpu --locked --all-targets -- -D warnings: exit 0 (4 errors before).
  • cargo test -p leonida-gpu --locked: 755 passed, 0 failed (rerun on the merge side on main f70caeea45).
  • check_no_game_data.py on the three files: pass. Not a rendering change: no in-game gate.

AI-assisted

Written with Freebuff/Buffy (the tool does not name its underlying model), driven by Moon. Reviewed by a separate Claude Opus 5.5 reviewer instance: accepted, behaviour strictly unchanged.

🤖 PR opened with Claude Code

## Change `cargo clippy -p leonida-gpu --locked --all-targets -- -D warnings` failed on main with 4 errors (from #3439 and #3445, reported by OreoFR's agent). Fixed without changing behaviour: - `ValueWait::engine()` (unused accessor) removed; the `engine` field stays, it is still filled, logged and counted. - `wait_for` takes a small `ValueWaitCall` struct instead of 8 arguments, built by `wait_value`/`wait_value64` (fields by name, same types; `entry` and `measure_call!` unchanged; the 64-bit wait still has no mask). - `list/values.rs:249`: `!who.modelled(false)` instead of `== false`. - `descriptor.rs:464`: `parts` bound directly in both branches; order of `written.take` / `told` unchanged. ## Tests - `cargo clippy -p leonida-gpu --locked --all-targets -- -D warnings`: exit 0 (4 errors before). - `cargo test -p leonida-gpu --locked`: 755 passed, 0 failed (rerun on the merge side on main `f70caeea45`). - `check_no_game_data.py` on the three files: pass. Not a rendering change: no in-game gate. ## AI-assisted Written with **Freebuff/Buffy** (the tool does not name its underlying model), driven by Moon. Reviewed by a separate Claude Opus 5.5 reviewer instance: accepted, behaviour strictly unchanged. 🤖 PR opened with [Claude Code](https://claude.com/claude-code)
`cargo clippy -p leonida-gpu --locked --all-targets -- -D warnings` fails on
main with four findings; each is answered where it is, no behaviour changed:

- `ValueWait::engine` was the accessor only the tests asked for. The field
  stays: `new` fills it from the wait's own argument, clamped to 3, the log
  line names the engine through it, and `values::engine_seen` counts the
  waits by engine. The accessor goes and its test reads the field.
- `wait_for`'s eight arguments become one `ValueWaitCall`, which the two list
  methods that record a wait build; the function unpacks it on entry.
- `who.modelled(false) == false` is `!who.modelled(false)`.
- `parts` is bound where it is made, in both branches of the port #2 choice.

`cargo clippy -p leonida-gpu --locked --all-targets -- -D warnings`: exit 0.
`cargo test -p leonida-gpu --locked`: 755 passed, 0 failed, 60 ignored.

AI-assisted (Freebuff, Buffy)
`ValueWaitCall` is built once per recorded wait, passed by value and unpacked
there; nothing copies or clones it (4 uses, all moves). The derive was left
over from drafting.

`cargo clippy -p leonida-gpu --locked --all-targets -- -D warnings`: exit 0.
`cargo test -p leonida-gpu --locked`: 755 passed, 0 failed, 60 ignored.

AI-assisted (Freebuff, Buffy)
Author
Member

Merging (squash), with Moon's written OK as maintainer. Not a rendering change. Tested on the merged tree (branch already on main f70caeea45): cargo test -p leonida-gpu --locked 755 passed, cargo clippy ... -- -D warnings exit 0. Separate reviewer: accepted.

Merging (squash), with Moon's written OK as maintainer. Not a rendering change. Tested on the merged tree (branch already on main `f70caeea45`): `cargo test -p leonida-gpu --locked` 755 passed, `cargo clippy ... -- -D warnings` exit 0. Separate reviewer: accepted.
OreoFR referenced this pull request from a commit 2026-12-04 13:30:49 +00:00
Sign in to join this conversation.
No description provided.