From 7d943b1ae54d7bb10e1b829535924d6428f44b1e Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 29 Jul 2020 05:45:48 +0900 Subject: [PATCH] Re-add rust-lang/rust#71546 with another MCVE --- ices/71546-2.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ices/71546-2.rs diff --git a/ices/71546-2.rs b/ices/71546-2.rs new file mode 100644 index 00000000..1b071e1e --- /dev/null +++ b/ices/71546-2.rs @@ -0,0 +1,14 @@ +pub fn serialize_as_csv(value: &V) -> Result +where + V: 'static, + for<'a> &'a V: IntoIterator, + for<'a> <&'a V as IntoIterator>::Item: ToString + 'static, +{ + let csv_str: String = value + .into_iter() + .map(|elem| elem.to_string()) + .collect::(); + Ok(csv_str) +} + +fn main() {}