Sort types enum kinds alphabetically

Change-Id: I5e390dbb7ecb79eef0dacca90a6897433ab1851e
This commit is contained in:
Artem Goncharov 2025-04-11 08:48:03 +02:00
parent 4e919bf8c0
commit 952612a5c9

View File

@ -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 %}