Skip to content

Commit

Permalink
Re-add rust-lang/rust#71546 with another MCVE
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jul 28, 2020
1 parent 59d97b5 commit 7d943b1
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 7d943b1

Please sign in to comment.