No longer need to derive Clone on message types

This commit is contained in:
Alex 2022-09-13 12:12:55 +02:00
parent 9362d26890
commit 8ab6256c3b
Signed by untrusted user: lx
GPG key ID: 0E496D15096376BE
3 changed files with 4 additions and 4 deletions

View file

@ -54,7 +54,7 @@ pub struct OrderTagStream(u64);
impl OrderTag { impl OrderTag {
/// Create a new stream from which to generate order tags. Example: /// Create a new stream from which to generate order tags. Example:
/// ``` /// ```ignore
/// let stream = OrderTag.stream(); /// let stream = OrderTag.stream();
/// let tag_1 = stream.order(1); /// let tag_1 = stream.order(1);
/// let tag_2 = stream.order(2); /// let tag_2 = stream.order(2);

View file

@ -38,7 +38,7 @@ pub(crate) type VersionTag = [u8; 16];
/// Value of the Netapp version used in the version tag /// Value of the Netapp version used in the version tag
pub(crate) const NETAPP_VERSION_TAG: u64 = 0x6e65746170700005; // netapp 0x0005 pub(crate) const NETAPP_VERSION_TAG: u64 = 0x6e65746170700005; // netapp 0x0005
#[derive(Serialize, Deserialize, Debug, Clone)] #[derive(Serialize, Deserialize, Debug)]
pub(crate) struct HelloMessage { pub(crate) struct HelloMessage {
pub server_addr: Option<IpAddr>, pub server_addr: Option<IpAddr>,
pub server_port: u16, pub server_port: u16,

View file

@ -30,7 +30,7 @@ const FAILED_PING_THRESHOLD: usize = 4;
// -- Protocol messages -- // -- Protocol messages --
#[derive(Serialize, Deserialize, Clone)] #[derive(Serialize, Deserialize)]
struct PingMessage { struct PingMessage {
pub id: u64, pub id: u64,
pub peer_list_hash: hash::Digest, pub peer_list_hash: hash::Digest,
@ -40,7 +40,7 @@ impl Message for PingMessage {
type Response = PingMessage; type Response = PingMessage;
} }
#[derive(Serialize, Deserialize, Clone)] #[derive(Serialize, Deserialize)]
struct PeerListMessage { struct PeerListMessage {
pub list: Vec<(NodeID, SocketAddr)>, pub list: Vec<(NodeID, SocketAddr)>,
} }