Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
ink
Commits
f197a986
Unverified
Commit
f197a986
authored
Oct 08, 2020
by
Andrew Jones
Committed by
GitHub
Oct 08, 2020
Browse files
Apply missing serde camelCase attributes (#514)
parent
6f701e50
Pipeline
#109955
failed with stages
in 4 minutes and 4 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
crates/metadata/src/layout/mod.rs
View file @
f197a986
...
...
@@ -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
,
...
...
crates/metadata/src/layout/tests.rs
View file @
f197a986
...
...
@@ -161,7 +161,7 @@ fn clike_enum_work() {
let
expected
=
serde_json
::
json!
{
{
"enum"
:
{
"dispatch
_k
ey"
:
"0x
\
"dispatch
K
ey"
:
"0x
\
0000000000000000
\
0000000000000000
\
0000000000000000
\
...
...
@@ -242,7 +242,7 @@ fn mixed_enum_work() {
let
expected
=
serde_json
::
json!
{
{
"enum"
:
{
"dispatch
_k
ey"
:
"0x
\
"dispatch
K
ey"
:
"0x
\
0000000000000000
\
0000000000000000
\
0000000000000000
\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment