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

Remove unnecessary AND #595

Merged
merged 1 commit into from Apr 14, 2022
Merged

Remove unnecessary AND #595

merged 1 commit into from Apr 14, 2022

Conversation

clehner
Copy link
Contributor

@clehner clehner commented Apr 6, 2022

& 0x1f sets the left three bits to zero, but | 0xe0 sets them back to one. The AND (&) can therefore be removed as unnecessary. This is similar to how in the NCS case there is only an AND (no OR).

  • 0x1f = 00011111
  • 0xe0 = 11100000

Copy link
Member

@KodrAus KodrAus left a comment

Thanks @clehner! This looks good to me.

@KodrAus KodrAus merged commit 43905eb into uuid-rs:main Apr 14, 2022
19 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.

None yet

2 participants