Skip to content

fix: remove EnumString from empty RewardLevel enum for strum 0.28.0 compatibility#967

Merged
gemcoder21 merged 2 commits intodependabot/cargo/strum-0.28.0from
copilot/sub-pr-966
Feb 23, 2026
Merged

fix: remove EnumString from empty RewardLevel enum for strum 0.28.0 compatibility#967
gemcoder21 merged 2 commits intodependabot/cargo/strum-0.28.0from
copilot/sub-pr-966

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

strum 0.28.0 changed EnumString macro expansion behavior — deriving it on an empty enum now generates unreachable code, causing cargo clippy -- -D warnings to fail.

Change

Removed EnumString from RewardLevel {} in crates/primitives/src/rewards.rs:

// Before
#[derive(Clone, Copy, Debug, Serialize, Deserialize, EnumIter, EnumString, AsRefStr, PartialEq)]
pub enum RewardLevel {}

// After
#[derive(Clone, Copy, Debug, Serialize, Deserialize, EnumIter, AsRefStr, PartialEq)]
pub enum RewardLevel {}

EnumString on an empty enum is a no-op (no variants to parse), so removing it has no behavioral impact.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@semanticdiff-com
Copy link

semanticdiff-com bot commented Feb 23, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  crates/primitives/src/rewards.rs  9% smaller

…m 0.28.0 unreachable code warning

Co-authored-by: gemcoder21 <[email protected]>
Copilot AI changed the title [WIP] Update strum dependency from 0.27.2 to 0.28.0 fix: remove EnumString from empty RewardLevel enum for strum 0.28.0 compatibility Feb 23, 2026
Copilot AI requested a review from gemcoder21 February 23, 2026 16:44
@gemcoder21 gemcoder21 marked this pull request as ready for review February 23, 2026 16:49
@gemcoder21 gemcoder21 merged commit 975234e into dependabot/cargo/strum-0.28.0 Feb 23, 2026
@gemcoder21 gemcoder21 deleted the copilot/sub-pr-966 branch February 23, 2026 16:49
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.

2 participants