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>
This commit is contained in:
Spencer JudgeandNikolay Volf authored and GitHub committed 2020-03-26 09:17:17 +01:00
1 parent d474864d67
commit 8e10f36628
1 file changed
+1
+1
View File
@@ -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 {