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

refactored score to type Score enum, for failure proof matching #77

Closed

Conversation

yebowhatsay
Copy link

Currently, Entropy.score is a u8. This is problematic as foolproof matching is less than ideal in downstream code. The API doesn't make it clear that there are really only 5 variants from 0 to 4. One has to account for u8s higher than 4. Converting to the Score Enum just makes this clear and safer. This might be a backward incompatible change, but better to do this now than later.

@jrandolf jrandolf mentioned this pull request May 11, 2024
@jrandolf
Copy link

@shssoichiro Let me take a crack at the PR. There are several things wrong with it; I'll upload a new one.

@jrandolf jrandolf mentioned this pull request May 11, 2024
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