From 220a5bad7619cbf77546fd573f9ccfe9d859b246 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Thu, 13 Dec 2018 17:32:17 +1100 Subject: [PATCH] Add clone method to some `types` --- beacon_chain/types/src/beacon_state.rs | 2 +- beacon_chain/types/src/candidate_pow_receipt_root_record.rs | 2 +- beacon_chain/types/src/shard_reassignment_record.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/beacon_chain/types/src/beacon_state.rs b/beacon_chain/types/src/beacon_state.rs index 03f2c93aa..efd04b551 100644 --- a/beacon_chain/types/src/beacon_state.rs +++ b/beacon_chain/types/src/beacon_state.rs @@ -7,7 +7,7 @@ use super::shard_reassignment_record::ShardReassignmentRecord; use super::validator_record::ValidatorRecord; use super::Hash256; -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] pub struct BeaconState { // Misc pub slot: u64, diff --git a/beacon_chain/types/src/candidate_pow_receipt_root_record.rs b/beacon_chain/types/src/candidate_pow_receipt_root_record.rs index 9a1e3e5c8..a06e5e794 100644 --- a/beacon_chain/types/src/candidate_pow_receipt_root_record.rs +++ b/beacon_chain/types/src/candidate_pow_receipt_root_record.rs @@ -1,6 +1,6 @@ use super::Hash256; -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] pub struct CandidatePoWReceiptRootRecord { pub candidate_pow_receipt_root: Hash256, pub votes: u64, diff --git a/beacon_chain/types/src/shard_reassignment_record.rs b/beacon_chain/types/src/shard_reassignment_record.rs index 2f2c8a8d9..c9a17741c 100644 --- a/beacon_chain/types/src/shard_reassignment_record.rs +++ b/beacon_chain/types/src/shard_reassignment_record.rs @@ -1,4 +1,4 @@ -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] pub struct ShardReassignmentRecord { pub validator_index: u64, pub shard: u64,