Unverified Commit f197a986 authored by Andrew Jones's avatar Andrew Jones Committed by GitHub
Browse files

Apply missing serde camelCase attributes (#514)

parent 6f701e50
Pipeline #109955 failed with stages
in 4 minutes and 4 seconds
......@@ -319,6 +319,7 @@ pub enum CryptoHasher {
serialize = "F::Type: Serialize, F::String: Serialize",
deserialize = "F::Type: DeserializeOwned, F::String: DeserializeOwned"
))]
#[serde(rename_all = "camelCase")]
pub struct ArrayLayout<F: Form = MetaForm> {
/// The offset key of the array layout.
///
......@@ -522,6 +523,7 @@ impl Discriminant {
serialize = "F::Type: Serialize, F::String: Serialize",
deserialize = "F::Type: DeserializeOwned, F::String: DeserializeOwned"
))]
#[serde(rename_all = "camelCase")]
pub struct EnumLayout<F: Form = MetaForm> {
/// The key where the discriminant is stored to dispatch the variants.
dispatch_key: LayoutKey,
......
......@@ -161,7 +161,7 @@ fn clike_enum_work() {
let expected = serde_json::json! {
{
"enum": {
"dispatch_key": "0x\
"dispatchKey": "0x\
0000000000000000\
0000000000000000\
0000000000000000\
......@@ -242,7 +242,7 @@ fn mixed_enum_work() {
let expected = serde_json::json! {
{
"enum": {
"dispatch_key": "0x\
"dispatchKey": "0x\
0000000000000000\
0000000000000000\
0000000000000000\
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment