aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-22 08:55:14 +0100
committerMartin Fischer <martin@push-f.com>2021-11-22 09:21:02 +0100
commitef698909223b2f29f7a6cae17f0aba3461c8803d (patch)
tree5f91a28cf98b6742c899bf515e99fcb8f89261ff /src/lib.rs
parent19823e09b7fe5e6a5b3965c7096c9daba18ce028 (diff)
support HashMap and BTreeMap
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index a5253d3..5e3653d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -413,6 +413,11 @@ impl TypeTransform {
let inner = inner.convert(quote!(x));
quote! {#arg.into_iter().map(|x| #inner).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::NoOp => arg,
}
}