Skip to content

Commit b3bc770

Browse files
committed
refactor(generate): make AliasMap use BTreeMap over HashMap
1 parent 262f178 commit b3bc770

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/generate/src/generate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{collections::HashMap, sync::LazyLock};
1+
use std::{collections::BTreeMap, sync::LazyLock};
22
#[cfg(feature = "load")]
33
use std::{
44
env, fs,
@@ -57,7 +57,7 @@ struct JSONOutput {
5757
syntax_grammar: SyntaxGrammar,
5858
lexical_grammar: LexicalGrammar,
5959
inlines: InlinedProductionMap,
60-
simple_aliases: HashMap<Symbol, Alias>,
60+
simple_aliases: BTreeMap<Symbol, Alias>,
6161
variable_info: Vec<VariableInfo>,
6262
}
6363

crates/generate/src/rules.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{collections::HashMap, fmt};
1+
use std::{collections::BTreeMap, fmt};
22

33
use serde::Serialize;
44
use smallbitvec::SmallBitVec;
@@ -34,7 +34,7 @@ pub enum Precedence {
3434
Name(String),
3535
}
3636

37-
pub type AliasMap = HashMap<Symbol, Alias>;
37+
pub type AliasMap = BTreeMap<Symbol, Alias>;
3838

3939
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash, Serialize)]
4040
pub struct MetadataParams {

0 commit comments

Comments
 (0)