Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions rpc/src/v1/types/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use ethereum_types::{H64 as Eth64, H160 as Eth160, H256 as Eth256, H520 as Eth52
macro_rules! impl_hash {
($name: ident, $other: ident, $size: expr) => {
/// Hash serialization
#[derive(Copy, Clone)]
pub struct $name(pub [u8; $size]);

impl Eq for $name { }
Expand Down Expand Up @@ -99,14 +100,6 @@ macro_rules! impl_hash {
}
}

impl Clone for $name {
fn clone(&self) -> Self {
let mut r = [0; $size];
r.copy_from_slice(&self.0);
$name(r)
}
}

impl serde::Serialize for $name {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: serde::Serializer {
Expand Down