Use `Self` & fix bug when overriding `stringify!` by konsumlamm · Pull Request #249 · bitflags/bitflags · GitHub
Skip to content

Use Self & fix bug when overriding stringify! - #249

Merged
KodrAus merged 2 commits into
bitflags:masterfrom
konsumlamm:self
Aug 5, 2021
Merged

KodrAus merged 2 commits into
bitflags:masterfrom
konsumlamm:self

Conversation

@konsumlamm

@konsumlamm konsumlamm commented Aug 4, 2021 •

Copy link
Copy Markdown
Contributor

Using Self instead of $BitFlags is cleaner imo and makes the code more readable.

There was a bug when overriding stringify!, which I fixed and added a test case for (see tests/redefinition.rs).

Fix bug when overriding `stringify!`

@KodrAus KodrAus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @konsumlamm! This is a nice improvement

@KodrAus
KodrAus merged commit 9defa89 into bitflags:master Aug 5, 2021
@konsumlamm
konsumlamm deleted the self branch August 5, 2021 09:45
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