Skip to content

Commit

Permalink
discover: Implement Clone for Change (#701)
Browse files Browse the repository at this point in the history
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.

Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
  • Loading branch information
samvrlewis and LucioFranco authored Oct 17, 2022
1 parent 7d829f1 commit c049ded
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tower/src/discover/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ where
}

/// A change in the service set.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub enum Change<K, V> {
/// A new service identified by key `K` was identified.
Insert(K, V),
Expand Down

0 comments on commit c049ded

Please sign in to comment.