diff --git a/substrate/core/trie/src/lib.rs b/substrate/core/trie/src/lib.rs index 3b9791e99a13b413a2758e7e4bcf0df615d0d2b7..60682df42cea5eb63f79abbe57981d1e888385f8 100644 --- a/substrate/core/trie/src/lib.rs +++ b/substrate/core/trie/src/lib.rs @@ -116,10 +116,11 @@ pub fn unhashed_trie<H: Hasher, I, A, B>(input: I) -> Vec<u8> where /// compact-encoded index (using `parity-codec` crate). pub fn ordered_trie_root<H: Hasher, I, A>(input: I) -> H::Out where - I: IntoIterator<Item = A> + Iterator<Item = A>, + I: IntoIterator<Item = A>, A: AsRef<[u8]>, { trie_root::<H, _, _, _>(input + .into_iter() .enumerate() .map(|(i, v)| (codec::Encode::encode(&codec::Compact(i as u32)), v)) )