diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -411,14 +411,14 @@ impl TypeTransform { quote! {#arg.map_err(|x| #err_inner)} } } - TypeTransform::Collection(inner) => { - let inner = inner.convert(quote!(x)); - quote! {#arg.into_iter().map(|x| #inner).collect()} + TypeTransform::CollectionOneType(type1) => { + let type1 = type1.convert(quote!(v1)); + quote! {#arg.into_iter().map(|v1| #type1).collect()} } - TypeTransform::CollectionMap(key, value) => { - let key = key.convert(quote!(k)); - let value = value.convert(quote!(v)); - quote! {#arg.into_iter().map(|(k,v)| (#key, #value)).collect()} + TypeTransform::CollectionTwoTypes(type1, type2) => { + let type1 = type1.convert(quote!(v1)); + let type2 = type2.convert(quote!(v2)); + quote! {#arg.into_iter().map(|(v1,v2)| (#type1, #type2)).collect()} } TypeTransform::NoOp => arg, } |