Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit 1a45492

Browse files
authored
Merge pull request #452 from JohnTitor/revive-71546
Re-add rust-lang/rust#71546 with another MCVE
2 parents 59d97b5 + 7d943b1 commit 1a45492

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ices/71546-2.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pub fn serialize_as_csv<V>(value: &V) -> Result<String, &str>
2+
where
3+
V: 'static,
4+
for<'a> &'a V: IntoIterator,
5+
for<'a> <&'a V as IntoIterator>::Item: ToString + 'static,
6+
{
7+
let csv_str: String = value
8+
.into_iter()
9+
.map(|elem| elem.to_string())
10+
.collect::<String>();
11+
Ok(csv_str)
12+
}
13+
14+
fn main() {}

0 commit comments

Comments
 (0)