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 common traits for DagCborCodec #32

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Conversation

expede
Copy link
Contributor

@expede expede commented Apr 21, 2024

Hey folks 👋

I'm upgrading some of my WIP IPLD libraries to ipld-core, and have found a few things that I think may be helpful upstream rather than just writing my own versions plus conversions.

This one is a small change to derive Copy, Clone, Debug, PartialEq, and Eq. Some of the tools I'm writing do automatic encoding/decoding into the Ipld data model, and so I need to be able to pass around the codec in a config struct. This is difficult in many places without at least Copy or Clone.

If this PR is accepted, I can do the same for DagJsonCodec and DagPbCodec.

Thanks 😃🦀

* Derive Copy, Clone, Debug, PartialEq, and Eq
@expede expede mentioned this pull request Apr 21, 2024
Copy link
Member

@vmx vmx left a comment

Choose a reason for hiding this comment

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

Thanks a lot! PRs for the other crates would of course be appreciated.

@vmx vmx merged commit ea977f2 into ipld:master Apr 22, 2024
3 checks passed
@expede expede deleted the simple-traits branch April 22, 2024 18:13
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