diff --git a/ruby/Cargo.lock b/ruby/Cargo.lock index f2233f30072..649bc74b269 100644 Binary files a/ruby/Cargo.lock and b/ruby/Cargo.lock differ diff --git a/ruby/extractor/Cargo.toml b/ruby/extractor/Cargo.toml index efc5a12159d..2cdf20ac50d 100644 --- a/ruby/extractor/Cargo.toml +++ b/ruby/extractor/Cargo.toml @@ -18,3 +18,4 @@ tracing-subscriber = { version = "0.2", features = ["env-filter"] } rayon = "1.5.0" num_cpus = "1.13.0" regex = "1.4.3" +indexmap = "1.7.0" \ No newline at end of file diff --git a/ruby/extractor/src/extractor.rs b/ruby/extractor/src/extractor.rs index 1f7e845bc1b..8170d677082 100644 --- a/ruby/extractor/src/extractor.rs +++ b/ruby/extractor/src/extractor.rs @@ -1,6 +1,6 @@ use crate::trap; +use indexmap::IndexMap; use node_types::{EntryKind, Field, NodeTypeMap, Storage, TypeName}; -use std::collections::BTreeMap as Map; use std::fmt; use std::path::Path; @@ -407,7 +407,7 @@ impl<'a> Visitor<'a> { child_nodes: &[ChildNode], parent_id: trap::Label, ) -> Option> { - let mut map: Map<&Option, (&Field, Vec)> = Map::new(); + let mut map: IndexMap<&Option, (&Field, Vec)> = IndexMap::new(); for field in fields { map.insert(&field.name, (field, Vec::new())); } diff --git a/ruby/extractor/src/trap.rs b/ruby/extractor/src/trap.rs index 8fbe0e52801..8e9b90c23d1 100644 --- a/ruby/extractor/src/trap.rs +++ b/ruby/extractor/src/trap.rs @@ -1,22 +1,22 @@ use std::borrow::Cow; -use std::collections::BTreeMap; use std::fmt; use std::io::BufWriter; use std::path::Path; use flate2::write::GzEncoder; +use indexmap::IndexMap; pub struct Writer { /// Labels that should be assigned fresh ids, e.g. `#123=*`. fresh_ids: Vec