diff --git a/Cargo.lock b/Cargo.lock index 9435feda..4bb9a6a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -646,6 +646,7 @@ dependencies = [ name = "nac3artiq" version = "0.1.0" dependencies = [ + "indexmap 2.7.1", "itertools", "nac3core", "nac3ld", diff --git a/nac3artiq/Cargo.toml b/nac3artiq/Cargo.toml index fa804659..2bceb4d2 100644 --- a/nac3artiq/Cargo.toml +++ b/nac3artiq/Cargo.toml @@ -9,6 +9,7 @@ name = "nac3artiq" crate-type = ["cdylib"] [dependencies] +indexmap = "2.7" itertools = "0.14" pyo3 = { version = "0.21", features = ["extension-module", "gil-refs"] } parking_lot = "0.12" diff --git a/nac3artiq/src/lib.rs b/nac3artiq/src/lib.rs index 23830463..1dee8dd8 100644 --- a/nac3artiq/src/lib.rs +++ b/nac3artiq/src/lib.rs @@ -19,6 +19,7 @@ use std::{ sync::Arc, }; +use indexmap::IndexMap; use itertools::Itertools; use parking_lot::{Mutex, RwLock}; use pyo3::{ @@ -1218,8 +1219,8 @@ impl Nac3 { content_modules: &PySet, ) -> PyResult<()> { let (modules, class_ids) = - Python::with_gil(|py| -> PyResult<(HashMap, HashSet)> { - let mut modules: HashMap = HashMap::new(); + Python::with_gil(|py| -> PyResult<(IndexMap, HashSet)> { + let mut modules: IndexMap = IndexMap::new(); let mut class_ids: HashSet = HashSet::new(); let id_fn = PyModule::import(py, "builtins")?.getattr("id")?;