zefchain / bcs

Rust implementation of the Binary Canonical Serialization (BCS) format
Apache License 2.0
15 stars 11 forks source link

Fix enum nesting checks #2

Closed ma2bd closed 2 years ago

ma2bd commented 2 years ago

Import fix from @igor-aptos: https://github.com/aptos-labs/bcs/pull/2

I had to write the unit test in a different way because we don't have a way to control the maximal nesting depth at runtime. (At least not yet in this repo.) If needed, the new test could be easily generalized to all kinds of data structures.

I deactivated merge commits in this repo so I'll probably "squash-and-rebase" everything when closing the PR.