Skip to content

refactor: add derive_more to protocol newtypes#9

Merged
markovejnovic merged 3 commits into
mainfrom
refactor/derive-mode
May 23, 2026
Merged

refactor: add derive_more to protocol newtypes#9
markovejnovic merged 3 commits into
mainfrom
refactor/derive-mode

Conversation

@markovejnovic
Copy link
Copy Markdown
Contributor

Summary

  • Add derive_more (1.0, feature-gated: deref, from, display) as a workspace dependency
  • Derive From, Deref, Display on all 4 newtypes in hm-plugin-protocol: ArchiveId, SnapshotRef, SocketHandle, LoopbackHandle
  • Update call sites to use derived Display (replacing .0 in format strings) and From (replacing bare constructors) where it improves readability

Test plan

  • cargo check -p hm-plugin-protocol — clean
  • cargo check -p hm-plugin-protocol --target wasm32-wasip1 — clean (proc-macro only, no WASM runtime impact)
  • cargo test -p hm-plugin-protocol — 13 tests pass
  • cargo clippy -p hm-plugin-protocol -p harmont-cli -- -D warnings — clean

@markovejnovic markovejnovic merged commit b988de2 into main May 23, 2026
22 checks passed
@markovejnovic markovejnovic deleted the refactor/derive-mode branch May 23, 2026 23:25
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