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

Implement Eq and PartialEq #13

Closed
Pscheidl opened this issue Feb 18, 2024 · 1 comment
Closed

Implement Eq and PartialEq #13

Pscheidl opened this issue Feb 18, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Pscheidl
Copy link
Owner

Since the underlying arrays are the same size (not growing at runtime) and key indices are always the same, values must be compared. Therefore, Eq shouldn't be required to be implemented for the enum (the keys) itself.

@Pscheidl Pscheidl added the enhancement New feature or request label Feb 18, 2024
@Pscheidl Pscheidl self-assigned this Feb 18, 2024
Pscheidl added a commit that referenced this issue Feb 18, 2024
Positions of keys are always the same, because the underlying
array always has the same layout. Therefore, values can be
compared directly.

GH-13
Pscheidl added a commit that referenced this issue Feb 18, 2024
feat: Implement Eq and PartialEq for EnumTable and EnumMap
@Pscheidl
Copy link
Owner Author

Done, released in version 0.9.0

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

No branches or pull requests

1 participant