diff options
author | Nadrieril | 2019-04-14 23:52:34 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-14 23:53:02 +0200 |
commit | 89667f976dc6ed006c9b983dd64301cf477b9008 (patch) | |
tree | 9652985c5378fa06e20d24406e7f64b37d909ae1 /dhall_generator | |
parent | 4c840270cf69f9580b18c43736bd247cab74e896 (diff) |
Namespace deserialization functions in a `de` submodule
Closes #73
Diffstat (limited to '')
-rw-r--r-- | dhall_generator/src/derive.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dhall_generator/src/derive.rs b/dhall_generator/src/derive.rs index e231702..208c98b 100644 --- a/dhall_generator/src/derive.rs +++ b/dhall_generator/src/derive.rs @@ -18,7 +18,7 @@ where T: quote::ToTokens, { quote!( - <#ty as dhall::SimpleStaticType>::get_simple_static_type() + <#ty as ::dhall::de::SimpleStaticType>::get_simple_static_type() ) } @@ -147,7 +147,7 @@ pub fn derive_simple_static_type_inner( let mut local_where_clause = orig_where_clause.clone(); local_where_clause .predicates - .push(parse_quote!(#ty: dhall::SimpleStaticType)); + .push(parse_quote!(#ty: ::dhall::de::SimpleStaticType)); let phantoms = generics.params.iter().map(|param| match param { syn::GenericParam::Type(syn::TypeParam { ident, .. }) => { quote!(#ident) @@ -169,17 +169,17 @@ pub fn derive_simple_static_type_inner( for ty in constraints.iter() { where_clause .predicates - .push(parse_quote!(#ty: dhall::SimpleStaticType)); + .push(parse_quote!(#ty: ::dhall::de::SimpleStaticType)); } let ident = &input.ident; let tokens = quote! { - impl #impl_generics dhall::SimpleStaticType for #ident #ty_generics + impl #impl_generics ::dhall::de::SimpleStaticType for #ident #ty_generics #where_clause { fn get_simple_static_type<'get_simple_static_type>() -> - dhall::expr::SimpleType<'get_simple_static_type> { + ::dhall::expr::SimpleType<'get_simple_static_type> { #(#assertions)* - dhall::expr::SimpleType::from(#get_type) + ::dhall::expr::SimpleType::from(#get_type) } } }; |