From 77a3b8a1e1bc07cc8f7b9692503b028e65d4e20f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= Date: Sun, 14 Jan 2024 17:04:11 +0100 Subject: [PATCH] Replace a trie map with a hash map --- src/type_inference.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/type_inference.rs b/src/type_inference.rs index 3dde912..85930b5 100644 --- a/src/type_inference.rs +++ b/src/type_inference.rs @@ -39,20 +39,20 @@ pub fn ti_module(module: &[ast::RenamedDecl]) -> (Map, TrieMap) -> Map { // Collect data con types, to be used in field types. - let mut con_ty_refs: TrieMap = Default::default(); + let mut con_ty_refs: Map = Default::default(); for decl in decls { match &decl.node { ast::Decl_::Data(decl) => { let ty_con = TyRef::new_con(decl.node.ty_con.clone()); for con in &decl.node.cons { - con_ty_refs.insert_mut(con.node.con.clone(), ty_con.clone()); + con_ty_refs.insert(con.node.con.clone(), ty_con.clone()); } } ast::Decl_::Newtype(decl) => { let ty_con = TyRef::new_con(decl.node.ty_con.clone()); - con_ty_refs.insert_mut(decl.node.con.node.con.clone(), ty_con); + con_ty_refs.insert(decl.node.con.node.con.clone(), ty_con); } ast::Decl_::Type(_)