Keep type of namespace-iterator in helpers
diff --git a/syntax/mangled.rs b/syntax/mangled.rs
index 2a2fa4c..a89060d 100644
--- a/syntax/mangled.rs
+++ b/syntax/mangled.rs
@@ -1,11 +1,12 @@
+use crate::syntax::namespace::Namespace;
use crate::syntax::{Atom, Type};
pub trait ToMangled {
- fn to_mangled(&self, namespace: &Vec<String>) -> String;
+ fn to_mangled(&self, namespace: &Namespace) -> String;
}
impl ToMangled for Type {
- fn to_mangled(&self, namespace: &Vec<String>) -> String {
+ fn to_mangled(&self, namespace: &Namespace) -> String {
match self {
Type::Ident(ident) => {
let mut instance = String::new();
diff --git a/syntax/typename.rs b/syntax/typename.rs
index 016749a..b4261f9 100644
--- a/syntax/typename.rs
+++ b/syntax/typename.rs
@@ -1,11 +1,12 @@
+use crate::syntax::namespace::Namespace;
use crate::syntax::{Atom, Type};
pub trait ToTypename {
- fn to_typename(&self, namespace: &Vec<String>) -> String;
+ fn to_typename(&self, namespace: &Namespace) -> String;
}
impl ToTypename for Type {
- fn to_typename(&self, namespace: &Vec<String>) -> String {
+ fn to_typename(&self, namespace: &Namespace) -> String {
match self {
Type::Ident(ident) => {
let mut inner = String::new();