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

feat(mask): unset bit, count set bits, index of the first set bit #58

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

shekhirin
Copy link
Contributor

@shekhirin shekhirin added the enhancement New feature or request label Oct 15, 2024
@shekhirin shekhirin changed the title feat(mask): unset bit feat(mask): unset bit, count set bits, index of the first set bit Oct 15, 2024
src/mask.rs Outdated
Comment on lines 81 to 83
pub const fn first_set_bit_index(self) -> u8 {
self.0.trailing_zeros() as u8
}
Copy link
Member

Choose a reason for hiding this comment

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

should this return Option? no bits might be set

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep right, fixed

@rkrasiuk rkrasiuk merged commit db0def2 into main Oct 16, 2024
21 checks passed
@rkrasiuk rkrasiuk deleted the alexey/tree-mask-unset-bit branch October 16, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants