From 8ab6256c3b5a2cde7144b3a5e1ef488b7bce6227 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 13 Sep 2022 12:12:55 +0200 Subject: No longer need to derive Clone on message types --- src/message.rs | 2 +- src/netapp.rs | 2 +- src/peering/fullmesh.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/message.rs b/src/message.rs index b12da32..9cc1a3e 100644 --- a/src/message.rs +++ b/src/message.rs @@ -54,7 +54,7 @@ pub struct OrderTagStream(u64); impl OrderTag { /// Create a new stream from which to generate order tags. Example: - /// ``` + /// ```ignore /// let stream = OrderTag.stream(); /// let tag_1 = stream.order(1); /// let tag_2 = stream.order(2); diff --git a/src/netapp.rs b/src/netapp.rs index f1e14ed..b1ad9db 100644 --- a/src/netapp.rs +++ b/src/netapp.rs @@ -38,7 +38,7 @@ pub(crate) type VersionTag = [u8; 16]; /// Value of the Netapp version used in the version tag pub(crate) const NETAPP_VERSION_TAG: u64 = 0x6e65746170700005; // netapp 0x0005 -#[derive(Serialize, Deserialize, Debug, Clone)] +#[derive(Serialize, Deserialize, Debug)] pub(crate) struct HelloMessage { pub server_addr: Option, pub server_port: u16, diff --git a/src/peering/fullmesh.rs b/src/peering/fullmesh.rs index 2f3330e..fb2e3d1 100644 --- a/src/peering/fullmesh.rs +++ b/src/peering/fullmesh.rs @@ -30,7 +30,7 @@ const FAILED_PING_THRESHOLD: usize = 4; // -- Protocol messages -- -#[derive(Serialize, Deserialize, Clone)] +#[derive(Serialize, Deserialize)] struct PingMessage { pub id: u64, pub peer_list_hash: hash::Digest, @@ -40,7 +40,7 @@ impl Message for PingMessage { type Response = PingMessage; } -#[derive(Serialize, Deserialize, Clone)] +#[derive(Serialize, Deserialize)] struct PeerListMessage { pub list: Vec<(NodeID, SocketAddr)>, } -- cgit v1.2.3