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

Consider removing MultihashDigest and Hasher traits #285

Open
thomaseizinger opened this issue Mar 29, 2023 · 0 comments
Open

Consider removing MultihashDigest and Hasher traits #285

thomaseizinger opened this issue Mar 29, 2023 · 0 comments

Comments

@thomaseizinger
Copy link
Contributor

Fundamentally, traits are meant for abstractions. If we don't create abstractions, the traits are not needed. As part of working on #272, it became apparent that the MultihashDigest and Hasher trait are never used for abstractions, only to enforce an interface.

We could change the multihash-derive crate from a custom derive to a proc-macro that just creates an impl block for us, based on API conventions of the various hashers.

If we want to stick to the traits, it would make more sense to develop a generic Codetable component that abstracts over the Hasher trait.

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

No branches or pull requests

1 participant