Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gadget-blueprint-serde)!: change array/tuple serialization #474

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

Serial-ATA
Copy link
Contributor

Previously, Vec<T>, [T; N], and (T, T, T) would all serialize to Field::List. Now the following happens:

  • Vec<T> -> Field::List
  • [T; N] OR (T, T, T) -> Field::Array
    • The major change is that homogeneous tuples are treated as arrays now
  • (X, Y, Z) -> Error (for now), waiting for tuple support in the runtime.

Previously, `Vec<T>`, `[T; N]`, and `(T, T, T)` would all serialize to `Field::List`. Now the following happens:

* `Vec<T>` -> `Field::List`
* `[T; N]` **OR** `(T, T, T)` -> `Field::Array`
  * The major change is that homogeneous tuples are treated as arrays now
* `(X, Y, Z)` -> Error (for now), waiting for tuple support in the runtime.
Copy link
Contributor

@shekohex shekohex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Serial-ATA Serial-ATA merged commit 7a60338 into main Nov 13, 2024
13 checks passed
@Serial-ATA Serial-ATA deleted the serial/blueprint-serde-seq branch November 13, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed ✅
Development

Successfully merging this pull request may close these issues.

2 participants