Skip to content

Commit

Permalink
Change HashMap to IndexMap
Browse files Browse the repository at this point in the history
  • Loading branch information
imaqtkatt committed Mar 1, 2024
1 parent 4f14162 commit a7d91b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/term/check/shared_names.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use std::{collections::HashMap, fmt::Display};
use std::fmt::Display;

use indexmap::IndexMap;

use crate::term::{Ctx, Name};

Expand All @@ -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;
Expand Down

0 comments on commit a7d91b6

Please sign in to comment.