From d7c95cbb91c33a04301a21e0b8e0042accfe524c Mon Sep 17 00:00:00 2001 From: Antonius Naumann Date: Thu, 11 Jan 2024 20:33:27 +0100 Subject: [PATCH] Point transpiled vec to correct module path --- galvan-transpiler/src/transpile_item/type.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/galvan-transpiler/src/transpile_item/type.rs b/galvan-transpiler/src/transpile_item/type.rs index 70a9010..354f026 100644 --- a/galvan-transpiler/src/transpile_item/type.rs +++ b/galvan-transpiler/src/transpile_item/type.rs @@ -6,15 +6,15 @@ use galvan_resolver::Scope; // TODO: Re-export used types from galvan library to avoid referencing the used crates directly -impl_transpile!(ArrayTypeItem, "std::collections::Vec<{}>", elements); +impl_transpile!(ArrayTypeItem, "::std::vec::Vec<{}>", elements); impl_transpile!( DictionaryTypeItem, - "std::collections::HashMap<{}, {}>", + "::std::collections::HashMap<{}, {}>", key, value ); impl_transpile!(OrderedDictionaryTypeItem, "TODO {} {}", key, value); -impl_transpile!(SetTypeItem, "std::collections::HashSet<{}>", elements); +impl_transpile!(SetTypeItem, "::std::collections::HashSet<{}>", elements); impl_transpile!(TupleTypeItem, "({})", elements); impl_transpile_fn!(OptionalTypeItem, "Option<{}>", element); impl_transpile!(BasicTypeItem, "{}", ident); @@ -25,7 +25,7 @@ impl Transpile for ResultTypeItem { if let Some(error) = error { transpile!(ctx, scope, "Result<{}, {}>", success, error) } else { - transpile!(ctx, scope, "anyhow::Result<{}>", success) + transpile!(ctx, scope, "::anyhow::Result<{}>", success) } } }