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

Add PartialEq derive to PublicKey #63

merged 2 commits into from
Aug 31, 2020


Copy link

@jack-michaud jack-michaud commented Aug 31, 2020

Adds PartialEq, Eq, and Hash to derive statement for PublicKey.
Derives from the PartialEq impl for MontgomeryPoint.

Seemed like this was an easy win so users of this crate can use the PartialEq derive macro on structs that use PublicKey!

Derives from the PartialEq impl for MontgomeryPoint
Copy link

This seems good -- I think that in addition to PartialEq there should also be derived Eq and also Hash. Eq is needed to use the == operator and there's no downside to deriving Hash. (I think the only other derivable traits are Ord and PartialOrd, and those should not be implemented because there's no ordering on public keys).

Copy link
Contributor Author

Thanks @hdevalence, good call -- just added Eq and Hash

@hdevalence hdevalence changed the base branch from master to develop August 31, 2020 19:52
@hdevalence hdevalence merged commit 1ede527 into dalek-cryptography:develop Aug 31, 2020
Copy link

Thanks! I'll publish this as 1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants