-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make sure that structs are serialized correctly (#34)
Rust structs have their entries ordered the same way as they are defined. When serialized to CBOR, they become maps by default. In DAG-CBOR the maps need to have a specific order, hence the keys might need to be re-ordered, so that they are independent of the order they were defined. This commit makes sure that it's actually the case. Fixes #31.
- Loading branch information
Showing
3 changed files
with
113 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters