Skip to content

Comments

discover: Implement Clone for Change#701

Merged
LucioFranco merged 2 commits intotower-rs:masterfrom
samvrlewis:clone-change
Oct 17, 2022
Merged

discover: Implement Clone for Change#701
LucioFranco merged 2 commits intotower-rs:masterfrom
samvrlewis:clone-change

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?

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.

3 participants