Sort types enum kinds alphabetically
Change-Id: I5e390dbb7ecb79eef0dacca90a6897433ab1851e
This commit is contained in:
parent
4e919bf8c0
commit
952612a5c9
@ -78,7 +78,7 @@ use {{ mod }};
|
||||
{{ subtype.derive_container_macros }}
|
||||
{{ subtype.serde_container_macros }}
|
||||
pub enum {{ subtype.name }} {
|
||||
{% for kind in subtype.variants %}
|
||||
{% for kind, v in subtype.variants | dictsort %}
|
||||
// {{ kind or "Empty" }}
|
||||
{{ subtype.variant_serde_macros(kind) }}
|
||||
{{ kind or "Empty" }},
|
||||
@ -90,7 +90,7 @@ use {{ mod }};
|
||||
{{ subtype.derive_container_macros }}
|
||||
{{ subtype.serde_container_macros }}
|
||||
pub enum {{ subtype.name }} {
|
||||
{% for kind, def in subtype.kinds.items() %}
|
||||
{% for kind, def in subtype.kinds | dictsort %}
|
||||
// {{ kind }}
|
||||
{{ kind }}({{ def.type_hint }}),
|
||||
{%- endfor %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user