Commit Graph

10 Commits

Author SHA1 Message Date
Lena Hellström 2c87442fe6 Decode context (#749)
Add an optional context for decoding allowing additional data to be passed to decoded structs.

---------

Co-authored-by: branchseer <dk4rest@gmail.com>
2025-03-06 09:54:43 +00:00
Hack666r 86ca1a44b3 chore typo fix README.md (#737) 2025-01-13 18:11:53 +01:00
Trangar dc468b4bed Made arrays never encode their length (#625)
* Made arrays with 32 elements or less never encode their length

* Removed `write_fixed_array_length` and `skip_fixed_array_length` as this was based on incorrect assumptions on how serde and bincode 1 works

---------

Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2023-03-30 15:09:33 +02:00
Trangar 974abe8661 Fixed the clippy Eq warning. (#574)
Added DecodeError::Io
Removed `PartialEq` on DecodeError
2022-08-18 15:57:18 +02:00
Lena Hellström f979383adb Fix tuple struct encoding in serde (#549) 2022-06-04 14:56:20 +02:00
Pedro Paulo Amorim 610b44d57f Add Membership test (#500)
* Add membership type

* Update README.md

* Update README.md

* Resolve missing info

* Restore README

* Fix trailing line

* Fix range

* Fixed formatting

Co-authored-by: Trangar <gpg@trangar.com>
2022-02-07 17:02:16 +01:00
Trangar 58dc788dfa Fix/issue 500 (#503)
* Fixed an issue where serde would decode a sequence with an u32 instead of a usize

* Added serde to the `the_same` test for roundtrips, fixed several issues.

* Fixed backwards compatibility for result, ipv4addr and ipv6addr

* Processed feedback
2022-02-07 16:52:15 +01:00
Trangar a8bdffa844 Made the compatibility check also include bincode 2 serde, and added comments (#501)
* Made the compatibility check also include bincode 2 serde, and added comments

* Added a CI step to run the compatibility tests
2022-02-06 09:50:16 +01:00
Trangar bef1f47f0f Added documentation on how to add compatibility tests (#497)
* Added documentation on how to add compatibility tests

* Fixed grammar issues
2022-02-02 09:40:38 +01:00
Trangar 00eea110d7 Bincode 1 compatibility framework (#489)
* Added a basic compatibility test to compare bincode 1 and bincode 2 output

* Moved compatibility to the /compatibility/ crate, made bincode-derive support `#[bincode(crate = "bincode_2")]`

* Added decode/deserialize test to test_same

* Added random test cases to compatibility/src/sway.rs

* Added test for bincode_1::options().with_fixint_encoding() and bincode_2::config::legacy(). Added rand license

* Added comments on why the configs are chosen
2022-02-01 14:15:15 +01:00