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

Packets should derive Clone #26

Closed
jeff-hiner opened this issue Dec 6, 2018 · 3 comments
Closed

Packets should derive Clone #26

jeff-hiner opened this issue Dec 6, 2018 · 3 comments

Comments

@jeff-hiner
Copy link
Contributor

Self-explanatory. I'm writing some tokio code right now that needs to take ownership of a PublishPacket to send it in a Future. I need to clone the packet before sending, in case I need to resend with DUP set. Should be as simple as adding Clone to the #[derive(...)] fields for each struct, and the VariablePacket enum.

@zonyitoo
Copy link
Owner

Hmm. That's true. Could you provide a PR?

@jeff-hiner
Copy link
Contributor Author

Here ya go:

#27

@zonyitoo
Copy link
Owner

Merged.

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

2 participants