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

feat: derive Clone for KeyPair and XKey #50

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

protochron
Copy link
Contributor

Feature or Problem

Allow KeyPair and XKey structs to be cloned. We have no technical reason not to do this, since it is trivial to copy out a private key from either key type and the underlying members of the struct are all already Clone.

Related Issues

Release Information

next

Consumer Impact

Testing

Unit Test(s)

Acceptance or Integration

Manual Verification

Allow KeyPair and XKey structs to be cloned. We have no technical reason
not to do this, since it is trivial to copy out a private key from
either key type and the underlying members of the struct are all already
Clone.

Signed-off-by: Dan Norris <protochron@users.noreply.github.com>
Copy link
Member

@joonas joonas left a comment

Choose a reason for hiding this comment

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

Given that the underlying types we build on implement Clone (here, here, here), this feels appropriate.

@brooksmtownsend
Copy link
Member

I've been working around this by using an Arc<>, and since that's trivial I don't see a reason why we shouldn't allow this

@joonas joonas merged commit c747c62 into wasmCloud:main Sep 19, 2024
4 checks passed
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.

3 participants