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

Re-add rust-lang/rust#71546 with another MCVE #452

Merged
merged 1 commit into from
Jul 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ices/71546-2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn serialize_as_csv<V>(value: &V) -> Result<String, &str>
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::<String>();
Ok(csv_str)
}

fn main() {}