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

discover: Implement Clone for Change #701

Merged
merged 2 commits into from
Oct 17, 2022

Conversation

samvrlewis
Copy link
Contributor

Implements Clone for discover::Change, if the underlying key and value both implement clone.

This is convenient for use-cases where a single change is duplicated so that it can be sent to multiple discover streams.

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

I think implementing Clone for this seems like a reasonable addition to the API.

Is there a reason that Clone was manually implemented rather than derived?

tower/src/discover/mod.rs Outdated Show resolved Hide resolved
Implements Clone for discover::Change, if the underlying key and value
both implement clone.

This is convenient for use-cases where a single change needs to be
duplicated, and sent to multiple discover streams.
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

looks good to me, thanks!

@LucioFranco LucioFranco enabled auto-merge (squash) October 17, 2022 18:37
@LucioFranco LucioFranco merged commit c049ded into tower-rs:master Oct 17, 2022
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.

None yet

3 participants