#[cfg(test)]
use crate::types::SHA256Hash;
use crate::types::{
BlockHeight, ConfigHash, ConsensusValueHash, EventsHash, NetworkHash,
ProposalHeaderHash, Protocol, StorageShortHash, TimePoint, TimeSpan,
TxsHash,
};
impl Copy for BlockHeight {}
impl Copy for Protocol {}
impl Copy for TimePoint {}
impl Copy for TimeSpan {}
impl Copy for ConfigHash {}
impl Copy for ConsensusValueHash {}
impl Copy for EventsHash {}
impl Copy for NetworkHash {}
impl Copy for ProposalHeaderHash {}
impl Copy for StorageShortHash {}
impl Copy for TxsHash {}
#[cfg(test)]
mod tests {
use super::*;
fn assert_copy<T: Copy>() {}
#[test]
fn integer_newtypes_are_copy() {
assert_copy::<BlockHeight>();
assert_copy::<Protocol>();
assert_copy::<TimePoint>();
assert_copy::<TimeSpan>();
}
#[test]
fn hash_newtypes_are_copy() {
assert_copy::<SHA256Hash>();
assert_copy::<ConfigHash>();
assert_copy::<ConsensusValueHash>();
assert_copy::<EventsHash>();
assert_copy::<NetworkHash>();
assert_copy::<ProposalHeaderHash>();
assert_copy::<StorageShortHash>();
assert_copy::<TxsHash>();
}
}