Skip to content

fix(clippy): PowerStatusV2::to_v1 takes self by value - #2

Merged
cmd0s merged 1 commit into
mainfrom
fix/clippy-to-v1-self
Jun 21, 2026
Merged

fix(clippy): PowerStatusV2::to_v1 takes self by value#2
cmd0s merged 1 commit into
mainfrom
fix/clippy-to-v1-self

Conversation

@cmd0s

@cmd0s cmd0s commented Jun 21, 2026

Copy link
Copy Markdown
Member

cargo clippy --all-targets -- -D warnings (the CI gate) fails on main after the v2 decoder merge (PR #1):

error: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
  --> src/proto/payloads.rs:314

PowerStatusV2 is Copy, so to_v1 should take self by value per clippy::wrong_self_convention. Both call sites (dispatcher.rs:77, the round-trip test) pass an owned/Copy value, so they are unaffected.

Verified locally: cargo clippy --all-targets -- -D warnings clean, cargo fmt --check clean, 82/82 tests pass.

The published v2.1.0 release binary is unaffected (behaviour identical; release.yml does not run clippy). This only greens main CI.

@cmd0s
cmd0s merged commit 5c91b15 into main Jun 21, 2026
4 checks passed
@cmd0s
cmd0s deleted the fix/clippy-to-v1-self branch June 21, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant