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

Arrays: serialization does not match schema #20

Closed
mcf-rocks opened this issue Mar 16, 2021 · 2 comments
Closed

Arrays: serialization does not match schema #20

mcf-rocks opened this issue Mar 16, 2021 · 2 comments

Comments

@mcf-rocks
Copy link
Contributor

I think this line:

borsh/borsh-rs/borsh/src/schema.rs
Line 162 in 50c3c5dimpl_arrays!(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 32 64 65);
Should be changed to be the same as this line:

borsh/borsh-rs/borsh/src/ser/mod.rs
Line 347 in 50c3c5dimpl_arrays!(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 64 65 128 256 512 1024 2048);
but with the addition of ‘0’ as the first element as per the schema line.

@mcf-rocks
Copy link
Contributor Author

mcf-rocks commented Mar 16, 2021

there is also this change to rust itself, about constants as parameters(?)... rust-lang/rust#79135 ... which might mean it's possible to do without the lists at all; i dunno, i'm really not a rust person.

@mcf-rocks
Copy link
Contributor Author

tbh I just would like schema to work for 512 & 1024, don't care about anything else.

@frol frol closed this as completed in 05ad797 Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant