Skip to content

Conversation

@wysiwys
Copy link
Contributor

@wysiwys wysiwys commented Jan 7, 2025

Hi,

This PR adds the method truncate(&mut self) to the Flags trait (see #425), which unsets any unknown bits. It also adds some tests for this method.

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 @wysiwys!

@KodrAus KodrAus merged commit 30901e6 into bitflags:main Jan 10, 2025
10 checks passed
@kadiwa4
Copy link

kadiwa4 commented Jan 13, 2025

The other methods on the Flags trait are also available as inherent methods on bitflags! types. Is there a reason why this method and contains_unknown_bits are not?

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.

3 participants