Skip to content

add MyFlags::Abc::iter_equal_names() method#489

Merged
KodrAus merged 3 commits into
bitflags:mainfrom
ssrlive:main
Jun 5, 2026
Merged

add MyFlags::Abc::iter_equal_names() method#489
KodrAus merged 3 commits into
bitflags:mainfrom
ssrlive:main

Conversation

@ssrlive

@ssrlive ssrlive commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/lib.rs Outdated
/// This iterator will yield all defined names for the flags value, including
/// any convenience flags.
#[inline]
pub fn iter_equal_names(&self) -> $crate::iter::ValueEqualNames<$BitFlags> {

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.

We unfortunately can't add this as an inherent method on the generated flags type, because it can conflict with an inherent method already added by the user.

We'll need to add it to the Flags trait instead.

Comment thread src/iter.rs Outdated
@ssrlive

ssrlive commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

I have changed the code following your suggestions.

@ssrlive ssrlive force-pushed the main branch 2 times, most recently from 96bceab to 468cef8 Compare June 5, 2026 11:30
Comment thread src/iter.rs Outdated

@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 @ssrlive! This looks good to me

@KodrAus KodrAus merged commit fbbbfac into bitflags:main Jun 5, 2026
10 checks passed
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