From a7d91b60f76e409dd08276d67d7f32dc05d56ccd Mon Sep 17 00:00:00 2001 From: imaqtkatt Date: Fri, 1 Mar 2024 14:42:13 -0300 Subject: [PATCH] Change HashMap to IndexMap --- src/term/check/shared_names.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/term/check/shared_names.rs b/src/term/check/shared_names.rs index 94867ddd5..ac87b7290 100644 --- a/src/term/check/shared_names.rs +++ b/src/term/check/shared_names.rs @@ -1,4 +1,6 @@ -use std::{collections::HashMap, fmt::Display}; +use std::fmt::Display; + +use indexmap::IndexMap; use crate::term::{Ctx, Name}; @@ -14,7 +16,7 @@ impl Display for TopLevelErr { impl Ctx<'_> { /// Checks if exists shared names from definitions, adts and constructors. pub fn check_shared_names(&mut self) { - let mut checked = HashMap::<&Name, usize>::new(); + let mut checked = IndexMap::<&Name, usize>::new(); for adt_name in self.book.adts.keys() { *checked.entry(adt_name).or_default() += 1;