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

Commit

Permalink
Merge pull request #452 from JohnTitor/revive-71546
Browse files Browse the repository at this point in the history
Re-add rust-lang/rust#71546 with another MCVE
  • Loading branch information
Alexendoo authored Jul 29, 2020
2 parents 59d97b5 + 7d943b1 commit 1a45492
Showing 1 changed file with 14 additions and 0 deletions.
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() {}

0 comments on commit 1a45492

Please sign in to comment.