diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-22 08:55:14 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-22 09:21:02 +0100 |
commit | ef698909223b2f29f7a6cae17f0aba3461c8803d (patch) | |
tree | 5f91a28cf98b6742c899bf515e99fcb8f89261ff /src/lib.rs | |
parent | 19823e09b7fe5e6a5b3965c7096c9daba18ce028 (diff) |
support HashMap and BTreeMap
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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, } } |