Skip to content

add docs to describe the behavior of multi-bit flags#340

Merged
KodrAus merged 1 commit intobitflags:mainfrom
nicholasbishop:bishop-multi-bit-doc
Apr 17, 2023
Merged

add docs to describe the behavior of multi-bit flags#340
KodrAus merged 1 commit intobitflags:mainfrom
nicholasbishop:bishop-multi-bit-doc

Conversation

@nicholasbishop
Copy link
Contributor

This clears up possible confusion about how a flag that defines multiple bits behaves when calling from_bits or from_bits_truncate. Those functions do not treat multi-bit flags as a set of possible bits that can be set, but rather as a unit where the bits must exactly match one of the defined flags.

This clears up possible confusion about how a flag that defines multiple
bits behaves when calling `from_bits` or `from_bits_truncate`. Those
functions do not treat multi-bit flags as a set of possible bits that
can be set, but rather as a unit where the bits must exactly match one
of the defined flags.
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 @nicholasbishop! This is a great clarification 🙇

@KodrAus KodrAus merged commit 483b1bb into bitflags:main Apr 17, 2023
@nicholasbishop nicholasbishop deleted the bishop-multi-bit-doc branch April 17, 2023 21:36
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