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

allow for Server/WireTx without Clone #60

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

hvraven
Copy link
Contributor

@hvraven hvraven commented Nov 26, 2024

Server was required to implement Clone. This is only needed by its sender() function which clones the transmit wire. This function is not needed by the library itself.

Remove the hard requirement, implementing sender() only when the used WireTx is also Clone.

Still getting used to the code base, but it might be better to return a reference instead, allowing the caller to clone if needed.

@jamesmunns
Copy link
Owner

I'm generally okay with this, I'd probably wait to merge it though as it is a breaking change.

@jamesmunns
Copy link
Owner

Looks like CI is failing due to some examples and such needing the updated interface. You should be able to run these locally by just running ./ci.sh in the root of the project.

Server was required to implement `Clone`. This is only needed by its
`sender()` function which clones the transmit wire. This removes the hard
requirement, implementing `sender()` only when the used `WireTx` is also
`Clone`.
@jamesmunns
Copy link
Owner

I made some releases on the main postcard crates, so I'm going to merge this and bump the versions. Thank you!

@jamesmunns jamesmunns merged commit d504e61 into jamesmunns:main Nov 27, 2024
1 check 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.

2 participants