diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-21 19:52:30 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-21 19:54:46 +0100 |
commit | 0dd8413eca378e5dc2e6cbdc6f9c6f8bde604e4a (patch) | |
tree | e191baf60e478ed040c6a865cb7676f3465860b4 /src/lib.rs | |
parent | 23fcd4ef079ad2b4aed69b4f363cbb9e7102c4ed (diff) |
support boxed Iterator in Option
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -390,9 +390,9 @@ impl TypeTransform { let inner = opt.convert(quote!(x)); quote! {#arg.map(|x| #inner)} } - TypeTransform::Iterator(inner) => { + TypeTransform::Iterator(box_type, inner) => { let inner = inner.convert(quote!(x)); - quote! {Box::new(#arg.map(|x| #inner))} + quote! {Box::new(#arg.map(|x| #inner)) as #box_type} } TypeTransform::Result(ok, err) => { let map_ok = !matches!(ok.as_ref(), TypeTransform::NoOp); |