Address grumbles
This commit is contained in:
parent
beafa8f2df
commit
43ba23969e
|
@ -137,11 +137,11 @@ pub fn sec_trie_root<H, I, A, B>(input: I) -> H::Out
|
||||||
let gen_input: Vec<_> = input
|
let gen_input: Vec<_> = input
|
||||||
// first put elements into btree to sort them and to remove duplicates
|
// first put elements into btree to sort them and to remove duplicates
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(k, v)| (H::hash(&k.as_ref()), v))
|
.map(|(k, v)| (H::hash(k.as_ref()), v))
|
||||||
.collect::<BTreeMap<_, _>>()
|
.collect::<BTreeMap<_, _>>()
|
||||||
// then move them to a vector
|
// then move them to a vector
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(k, v)| (as_nibbles(&k.as_ref()), v) )
|
.map(|(k, v)| (as_nibbles(k.as_ref()), v) )
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
gen_trie_root::<H, _, _>(&gen_input)
|
gen_trie_root::<H, _, _>(&gen_input)
|
||||||
|
|
Loading…
Reference in New Issue