discover: Implement Clone for Change (#701)

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>
This commit is contained in:
Sam Lewis 2022-10-18 05:41:55 +11:00 committed by GitHub
parent 7d829f198e
commit c049ded33f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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),