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

Remove impossible HoloHash From conversions and make HoloHash::retype() private #2191

Merged
merged 7 commits into from
Apr 7, 2023

Conversation

maackle
Copy link
Member

@maackle maackle commented Apr 6, 2023

Summary

We had a bunch of From impls going from essentially an enum (a sum type) into one of its variants, which is ill-advised because there's no guarantee that the enum is of the expected variant (like going from AnyDhtHash into EntryHash, when it was actually an ActionHash).

This removes those Froms and make retype private so this kind of unsafe "casting" can't be done.

TODO:

  • CHANGELOG(s) updated with appropriate info
  • Just before pressing the merge button, ensure new entries to CHANGELOG(s) are still under the UNRELEASED heading

@maackle maackle enabled auto-merge (squash) April 7, 2023 17:12
@maackle maackle merged commit 1603e14 into develop Apr 7, 2023
@maackle maackle deleted the remove-holohash-froms branch April 7, 2023 17:42
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

4 participants