Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework decoding of
Box
es, Rc
s, Arc
s, arrays and enums (stack ov…
…erflow fix) (#426) * Rework decoding of `Box`es, `Rc`s, `Arc`s and arrays * Update changelog * Bump version to 3.5.0 * Fix typo * Reduce the size of an array in tests to make miri not run forever * Make the `TypeInfo` match exhaustive * Update dependencies * Update benchmarks to criterion 0.4 * Update `BitVec` benchmarks too * Fix the benchmarks for real this time * Use `Layout::new` instead of `Layout::from_size_align` Co-authored-by: Squirrel <giles@parity.io> * Move blanket decoding of wrapper types into a default impl * Fix stack overflow when decoding big nested enums * Bump version of `parity-scale-codec-derive` to 3.5.0 * Move the crate-level docs into README and include README as docs * Add a note regarding deserializing big arrays to the README * Update the CHANGELOG again * Remove one of the intermediate casts This cast was a no-op anyway, but it's slightly confusing as the length of the array in the pointer's type was incorrect, so let's just remove it. * README cleanups * Add `rust` markers and make indentation consistent in README snippets * Make `max-encoded-len` feature not force-enable `parity-scale-codec-derive` * Reexport derive macros not when `parity-scale-codec-derive` is enabled but when `derive` is * Update CHANGELOG again * Fix `parity-scale-codec-derive` tests compilation * Update `serde` * Update comment in `src/codec.rs` Co-authored-by: Bastian Köcher <git@kchr.de> * Update comment in `src/codec.rs` Co-authored-by: Roman <r.proskuryakoff@gmail.com> * Move the version bounds for `parity-scale-codec-derive` * Remove `DecodeContext` * Move the array byte size calculations to compile-time * Add a TODO about `Box::assume_init` * Move `DecodeFinished` into its own module * Add a TODO about `MaybeUninit::slice_assume_init_mut` * Update the changelog * `std` -> `core` so that no_std compiles --------- Co-authored-by: Squirrel <giles@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Roman <r.proskuryakoff@gmail.com>
- Loading branch information