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 derives for Clone, Debug, Eq, Hash, and PartialEq for public types #119

Merged
merged 11 commits into from Mar 6, 2020

Conversation

giarc3
Copy link
Member

@giarc3 giarc3 commented Feb 28, 2020

This makes sure that Clone, Debug, Eq, Hash, and PartialEq are on all of our public types.

Exceptions:

  • IronOxide/BlockingIronOxide only have Debug, as parts of them like recrypt stop them from having others.
  • build.rs-generated structs like ironoxide::proto::transform::PublicKey only have Clone and PartialEq. I looked into finding a way to make it add others with no success. The full list is EncryptedDekData, EncryptedDeks, PublicKey, UserOrGroup, and the enum UserOrGroup_oneof_userOrGroupId.

TODO:

  • Depend on released recrypt-rs
  • Changelog

@giarc3 giarc3 changed the title Add derives for PartialEq and Hash for public types Add derives for Clone, Debug, Eq, Hash, and PartialEq for public types Mar 3, 2020
src/internal/document_api/mod.rs Outdated Show resolved Hide resolved
@clintfred
Copy link
Contributor

I did open rust-itertools/itertools#417 to add Hash to EitherOrBoth. It won't matter for this PR, probably, but it would let us delete a couple Hash implementations.

@clintfred
Copy link
Contributor

That PR was merged.
So we could add the following to our Cargo.toml and remove the Hash impls created due to EitherOrBoth, or write a ticket and wait for the next release. I scanned through the commits to master and I don't see anything that concerns me, so I would do it, but others may disagree. Their release schedule is certainly sporadic.

# itertools 0.8.2++ - remove on next release
itertools = {git = "https://github.com/rust-itertools/itertools", rev = "c83cc48ffe39b96b7c6797b7b31752e840b373bb"}

@giarc3 giarc3 merged commit 1793b07 into master Mar 6, 2020
@giarc3 giarc3 deleted the 58-public-derives branch March 6, 2020 21:12
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

3 participants