aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 8fa1294..3b4aeeb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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,
}