-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
demo: Clean up serialization references
- Serialization doesn't require mutable access. - Use `.as_ref()` consistently to generate a `&[u8]` slice for deserialization. This works both with the `Bytes` type, where it's the simplest way to get a slice of the entire buffer span, and with plain `Vec` types, where some specific method is necessary since the arkworks `deserialize_canonical` function doesn't accept a simple `&Vec` reference. I expect serialization/deserialization to use byte slices, so I don't think the turbofish `::<&[u8]>` specification is adding much.
- Loading branch information
Showing
2 changed files
with
9 additions
and
9 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