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

Derive Eq trait for FromHexError #9

Merged
merged 1 commit into from
May 15, 2024

Conversation

jmacadie
Copy link
Contributor

Without this we cannot derive Eq on enums & structs that contain a FromHexError. It is trivial to derive since all the elements of FromHexError implement Eq already. From reading the docs I think that this type should implement Eq;

Implement Eq in addition to PartialEq if it’s guaranteed that PartialEq::eq(a, a) always returns true (reflexivity), in addition to the symmetric and transitive properties already required by PartialEq

I'm not sure if you've already considered this and rejected it but if not, including this would save me some hassle.

Without this we cannot derive Eq on enums & structs that contain a
FromHexError. It is trivial to derive since all the elements of
FromHexError implement Eq already
Copy link
Owner

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

Thanks! Sorry I missed this

@DaniPopes DaniPopes merged commit 7ceae26 into DaniPopes:master May 15, 2024
19 checks passed
@jmacadie
Copy link
Contributor Author

No probs & thanks!

@jmacadie jmacadie deleted the fix/derive_eq_for_error branch May 16, 2024 06:58
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