diff --git a/macros/src/actionlike.rs b/macros/src/actionlike.rs index ce230db9..64905dee 100644 --- a/macros/src/actionlike.rs +++ b/macros/src/actionlike.rs @@ -1,7 +1,7 @@ use crate::utils; use proc_macro2::{Span, TokenStream}; use quote::quote; -use std::collections::HashMap; +use std::collections::BTreeMap; use syn::{Attribute, Data, DataEnum, DeriveInput, Error, Ident}; // This approach and implementation is inspired by the `strum` crate, @@ -81,8 +81,8 @@ fn generate_input_control_kind_body( fn parse_variant_controls( data: &DataEnum, default_control: &Ident, -) -> syn::Result> { - let mut map = HashMap::::new(); +) -> syn::Result> { + let mut map = BTreeMap::::new(); for variant in data.variants.iter() { for attr in variant .attrs