From 38b191d4b34e522f2790f1e8be5930789d1e0df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Wed, 28 Sep 2016 23:32:32 +0200 Subject: [PATCH] Prioritizing re-imported transactions (#2372) * Prioritizing re-imported transactions * Fixing compilation on beta --- src/hash.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hash.rs b/src/hash.rs index 97b9545..f782d1f 100644 --- a/src/hash.rs +++ b/src/hash.rs @@ -64,11 +64,11 @@ pub fn clean_0x(s: &str) -> &str { macro_rules! impl_hash { ($from: ident, $size: expr) => { - #[derive(Eq)] #[repr(C)] /// Unformatted binary data of fixed length. pub struct $from (pub [u8; $size]); + impl From<[u8; $size]> for $from { fn from(bytes: [u8; $size]) -> Self { $from(bytes) @@ -210,6 +210,8 @@ macro_rules! impl_hash { } } + impl Eq for $from {} + impl PartialEq for $from { fn eq(&self, other: &Self) -> bool { for i in 0..$size {