From 689f637c7eba3c2449baccb1937aa36543b44b53 Mon Sep 17 00:00:00 2001 From: "Demi M. Obenour" Date: Fri, 7 Aug 2020 21:44:51 -0400 Subject: [PATCH] Implement the `concat` in `twox_64_concat` --- src/metadata.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/metadata.rs b/src/metadata.rs index bbaf478d8a..3ef160cfc9 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -274,7 +274,13 @@ impl StorageMetadata { StorageHasher::Blake2_256 => sp_core::blake2_256(bytes).to_vec(), StorageHasher::Twox128 => sp_core::twox_128(bytes).to_vec(), StorageHasher::Twox256 => sp_core::twox_256(bytes).to_vec(), - StorageHasher::Twox64Concat => sp_core::twox_64(bytes).to_vec(), + StorageHasher::Twox64Concat => { + sp_core::twox_64(bytes) + .iter() + .chain(bytes) + .cloned() + .collect() + } } }