aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-21 09:37:32 +0100
committerMartin Fischer <martin@push-f.com>2021-11-21 09:39:40 +0100
commit57641e00d6ed1fd7689c3079abb10f67d5387143 (patch)
treeadb48bb70be52bc6035d93826f7725dd64054b49 /src/lib.rs
parent34dc166a9bc003bad36c28aeb29b625195d20a74 (diff)
support -> &mut dyn Iterator<Item = Self::A>
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 439288e..c0286f8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -390,6 +390,10 @@ impl TypeTransform {
let inner = opt.convert(quote!(x));
quote! {#arg.map(|x| #inner)}
}
+ TypeTransform::Iterator(inner) => {
+ let inner = inner.convert(quote!(x));
+ quote! {Box::new(#arg.map(|x| #inner))}
+ }
TypeTransform::Result(ok, err) => {
let map_ok = !matches!(ok.as_ref(), TypeTransform::NoOp);
let map_err = !matches!(err.as_ref(), TypeTransform::NoOp);