paritytech / parity-scale-codec

Lightweight, efficient, binary serialization and deserialization codec
Apache License 2.0
243 stars 95 forks source link

Use `MAX_PREALLOCATION` consistently #605

Closed serban300 closed 1 month ago

serban300 commented 2 months ago

Related to #609

Use MAX_PREALLOCATION both when reading a vec from bytes and when decoding each element.

serban300 commented 1 month ago

@bkchr @koute could you PTAL on this PR since it's somewhat related to #609 ? Even though it's not a prerequisite, I think it would be nice to have.

serban300 commented 1 month ago

Thanks for the review ! Will address the comments in a new PR today.

LE: Here is the PR: #615