Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCan't deserialize structs with Option<BigDecimal> #1879
Comments
This comment has been minimized.
|
@xrl: which version of BigDecimal do you depend on? I think I've had that error when I've used two different versions of BigDecimal. The current stable release series |
This comment has been minimized.
xrl
commented
Oct 10, 2018
|
@kestred I did hit that problem initial, now I've made sure to sync up the library versions. the error still happens when versions are synced:
|
This comment has been minimized.
xrl
commented
Oct 11, 2018
|
OK, turns out my reproduction wasn't fair. Looks like the ordering of properties in the target struct must match the order in the Closing! |
xrl commentedOct 10, 2018
•
edited
Setup
Versions
1.3.3postgresFeature Flags
diesel = { version = "1.0.0", features = ["postgres", "32-column-tables", "numeric"] }Problem Description
My
table!definition hasNumericandNullable<Numeric>value. I can representBigDecimalin a struct but notOption<BigDecimal>. I get the following error:What are you trying to accomplish?
I want to support
Option<Numeric>values.What is the expected output?
It should compile and deserialize the same as
Option<bool>and friends.What is the actual output?
Are you seeing any additional errors?
Steps to reproduce
Checklist
closed if this is not the case)