forked from rust-embedded-community/serde-json-core
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Minimal reproducible example below. Note that the second you change u128 -> u64, the test passes.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case", untagged)]
enum ExecuteMsg {
Interface(Interface),
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
enum Interface {
IncreaseAllowance { amount: u128 },
}
#[test]
fn foo() {
let foo = ExecuteMsg::Interface(Interface::IncreaseAllowance { amount: 777 });
let foo_ser = serde_json_wasm::to_string(&foo).unwrap();
let wrapper_de: ExecuteMsg = serde_json_wasm::from_str(&foo_ser).unwrap();
}Metadata
Metadata
Assignees
Labels
No labels