From 8e10f3662860fe33e6421a8f6319b5e4f4a19fb2 Mon Sep 17 00:00:00 2001 From: Spencer Judge <sushisource@gmail.com> Date: Thu, 26 Mar 2020 01:17:17 -0700 Subject: [PATCH] Make AccountId32 hashable (#5405) * Make AccountId32 hashable * Only implement Hash in std Co-Authored-By: Nikolay Volf <nikvolf@gmail.com> Co-authored-by: Nikolay Volf <nikvolf@gmail.com> --- substrate/primitives/core/src/crypto.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/substrate/primitives/core/src/crypto.rs b/substrate/primitives/core/src/crypto.rs index 259c3c5f9a7..a9c118ce8f5 100644 --- a/substrate/primitives/core/src/crypto.rs +++ b/substrate/primitives/core/src/crypto.rs @@ -554,6 +554,7 @@ pub trait Public: AsRef<[u8]> + AsMut<[u8]> + Default + Derive + CryptoType + Pa /// An opaque 32-byte cryptographic identifier. #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Default, Encode, Decode)] +#[cfg_attr(feature = "std", derive(Hash))] pub struct AccountId32([u8; 32]); impl UncheckedFrom<crate::hash::H256> for AccountId32 { -- GitLab