Skip to content

Commit

Permalink
Point transpiled vec to correct module path
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniusnaumann committed Jan 11, 2024
1 parent b55cc25 commit d7c95cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions galvan-transpiler/src/transpile_item/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
}
}
}
Expand Down

0 comments on commit d7c95cb

Please sign in to comment.