diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-21 09:37:32 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-21 09:39:40 +0100 |
commit | 57641e00d6ed1fd7689c3079abb10f67d5387143 (patch) | |
tree | adb48bb70be52bc6035d93826f7725dd64054b49 /src/lib.rs | |
parent | 34dc166a9bc003bad36c28aeb29b625195d20a74 (diff) |
support -> &mut dyn Iterator<Item = Self::A>
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |