aboutsummaryrefslogtreecommitdiff
path: root/src/transform.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-22 10:06:35 +0100
committerMartin Fischer <martin@push-f.com>2021-11-22 10:10:59 +0100
commit69a3335f1b79b074a0e1038bdfd9aa79508131d1 (patch)
treebb352dad39e880d11a1802b11c2a939e941a2ff6 /src/transform.rs
parent3d3e2ac6cdce593ab68c78d583f57905523a1591 (diff)
refactor: support IntoIterMapCollect with N types
Diffstat (limited to 'src/transform.rs')
-rw-r--r--src/transform.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/transform.rs b/src/transform.rs
index fa7877e..f2744cf 100644
--- a/src/transform.rs
+++ b/src/transform.rs
@@ -120,9 +120,9 @@ impl TypeConverter<'_> {
} else if self.known_as_collection_with_one_type(&last_seg.ident)
&& path_len == 1
{
- return Ok(TypeTransform::CollectionOneType(
- self.convert_type(arg)?.into(),
- ));
+ return Ok(TypeTransform::IntoIterMapCollect(vec![
+ self.convert_type(arg)?
+ ]));
}
}
}
@@ -140,10 +140,10 @@ impl TypeConverter<'_> {
self.convert_type(arg2)?.into(),
));
} else if self.known_as_collection_with_two_types(&last_seg.ident) {
- return Ok(TypeTransform::CollectionTwoTypes(
- self.convert_type(arg1)?.into(),
- self.convert_type(arg2)?.into(),
- ));
+ return Ok(TypeTransform::IntoIterMapCollect(vec![
+ self.convert_type(arg1)?,
+ self.convert_type(arg2)?,
+ ]));
}
}
}