Skip to content

Conversation

anforowicz
Copy link
Contributor

PTAL?

Just a minor refactoring / no intended behavior changes - this PR:

  • Extracts fn write_binary_bitwise_op out of fn write_enum_operators - the only difference between BitAnd / BitOr / BitXor branches were the op used (& or | or ^) in 1) the name of operatorFOO and 2) in actual expression.
  • Also names enum_name so that it can be directly used in formatting specifiers (instead of using {} and then passing enm.name.cxx as an arg)

@dtolnay dtolnay merged commit 2826a7b into dtolnay:master Sep 19, 2025
30 checks passed
@anforowicz anforowicz deleted the deduplicate-enum-binary-op-derives branch September 19, 2025 16:15
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