Commit 98744eb3 authored by Peter Goodspeed-Niklaus's avatar Peter Goodspeed-Niklaus Committed by GitHub
Browse files

implement BoundedEncodedLen (#8720)



* implement BoundedEncodedLen

* update header

* update imports

* use impl_for_tuples instead of a custom macro

* remove redundant where clause

Co-authored-by: default avatarBastian Köcher <[email protected]>

* impl for Compact<T>

* impl BoundedEncodedLen for BoundedVec (#8727)

* impl BoundedEncodedLen for bool

* explicitly implement BoundedEncodedLen for each Compact form

Turns out that u16 doesn't play nicely with the pattern; those values
take two extra bytes, where all other cases take one. :(

* rename BoundedEncodedLen -> MaxEncodedLen

* add tests of compact encoded length

Co-authored-by: default avatarBastian Köcher <[email protected]>
parent 1f21d77a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment