Skip to content

Replace manual Display impls with strum derive macros#55

Merged
gvonness-apolitical merged 2 commits intomainfrom
refactor/strum-display-derive
Feb 10, 2026
Merged

Replace manual Display impls with strum derive macros#55
gvonness-apolitical merged 2 commits intomainfrom
refactor/strum-display-derive

Conversation

@gvonness-apolitical
Copy link
Collaborator

Summary

  • Add strum 0.26 dependency with derive feature
  • Replace 32 manual impl Display blocks across 22 files with #[derive(strum::Display)] and #[strum(serialize = "...")] attributes
  • Net reduction of ~280 lines of boilerplate match-arm code
  • Keep ~11 manual impls for complex cases (conditional formatting, field interpolation, helper method delegation)

Test plan

  • cargo build --workspace --all-features passes
  • cargo test --workspace --all-features passes (853 tests, 0 failures)
  • cargo clippy --workspace --all-features -- -D warnings clean

Eliminates boilerplate match-arm Display implementations across 22 files
by using #[derive(strum::Display)] with serialize attributes. Keeps
manual impls only for complex cases (conditional formatting, field
interpolation, delegation to helper methods).
@gvonness-apolitical gvonness-apolitical merged commit 1f76bdc into main Feb 10, 2026
10 checks passed
@gvonness-apolitical gvonness-apolitical deleted the refactor/strum-display-derive branch February 10, 2026 00:29
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