diff --git a/nested/src/type_system/type_term.rs b/nested/src/type_system/type_term.rs index b153177..41f5f17 100644 --- a/nested/src/type_system/type_term.rs +++ b/nested/src/type_system/type_term.rs @@ -144,12 +144,12 @@ impl TypeDict { tyid } + pub fn get_typename(&self, tid: &u64) -> Option { + self.typenames.my.get(tid).cloned() + } + pub fn get_typeid(&self, tn: &String) -> Option { - if let Some(id) = self.typenames.mλ.get(tn) { - Some(*id) - } else { - None - } + self.typenames.mλ.get(tn).cloned() } pub fn type_term_from_str(&self, typename: &str) -> Option {