Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a nit in the readme #307

Merged
merged 1 commit into from Mar 11, 2023
Merged

fix a nit in the readme #307

merged 1 commit into from Mar 11, 2023

Conversation

s1rius
Copy link
Contributor

@s1rius s1rius commented Mar 11, 2023

No description provided.

@@ -40,7 +40,7 @@ bitflags! {
const A = 0b00000001;
const B = 0b00000010;
const C = 0b00000100;
const ABC = Self::A.bits | Self::B.bits | Self::C.bits;
const ABC = Self::A.bits() | Self::B.bits() | Self::C.bits();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do a function call when the value is there in a variable?

Copy link
Member

Choose a reason for hiding this comment

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

In 2.x it's no longer in a field called bits, the library generates a newtype so the quickest migration is to use the method call instead.

Copy link
Member

@KodrAus KodrAus left a comment

Choose a reason for hiding this comment

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

Thanks @s1rius! This looks good to me

@KodrAus KodrAus merged commit 8011843 into bitflags:main Mar 11, 2023
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.

None yet

3 participants