type dict: add get_typename

This commit is contained in:
Michael Sippel 2023-02-11 11:54:30 +01:00
parent 6867297eea
commit 4afdb61b87
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -144,12 +144,12 @@ impl TypeDict {
tyid
}
pub fn get_typename(&self, tid: &u64) -> Option<String> {
self.typenames.my.get(tid).cloned()
}
pub fn get_typeid(&self, tn: &String) -> Option<TypeID> {
if let Some(id) = self.typenames..get(tn) {
Some(*id)
} else {
None
}
self.typenames..get(tn).cloned()
}
pub fn type_term_from_str(&self, typename: &str) -> Option<TypeTerm> {