Skip to content

Commit

Permalink
discover: Implement Clone for Change
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.
  • Loading branch information
samvrlewis committed Oct 14, 2022
1 parent 87fa8ef commit 156219a
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 156219a

Please sign in to comment.