paritytech / trie

Base-16 Modified Patricia Merkle Tree (aka Trie)
Apache License 2.0
251 stars 67 forks source link

Expand `NibbleVec` by 4 bytes (that was previously wasted as padding) #180

Closed koute closed 1 year ago

koute commented 1 year ago

I'm trying to do some refactoring of the iterators here, and I noticed that the NibbleVec technically wastes 4 bytes of space that otherwise could be used. Fixing this might or might not help anything, but it certainly triggers my OCD, so here's a PR that bumps the size so that no bytes are left behind.

The size_of::<NibbleVec>() remains unchanged before and after.