Remove Copy marker from large ServerInfo struct.

We don't want to encourage passing it by value. Doesn't matter much in
practice, but let's be tidy.

Per discussion at https://github.com/zenithdb/zenith/pull/195#issuecomment-849897327
This commit is contained in:
Heikki Linnakangas
2021-05-27 23:16:54 +03:00
parent adc0e04205
commit 6b615cbde1

View File

@@ -36,7 +36,7 @@ pub struct NodeId {
uuid: [u8; 16],
}
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ServerInfo {
/// proxy-safekeeper protocol version
pub protocol_version: u32,
@@ -220,7 +220,7 @@ impl ReceiveWalConn {
/* Update information about server, but preserve locally stored node_id */
let node_id = my_info.server.node_id;
my_info.server = server_info;
my_info.server = server_info.clone();
my_info.server.node_id = node_id;
/* Calculate WAL end based on local data */