Э
.iter().join(",").as_str()
fn join(&mut self, sep: &str) -> String
where Self::Item: std::fmt::Display
{
match self.next() {
None => String::new(),
Some(first_elt) => {
// estimate lower bound of capacity needed
let (lower, _) = self.size_hint();
let mut result = String::with_capacity(sep.len() * lower);
write!(&mut result, "{}", first_elt).unwrap();
for elt in self {
result.push_str(sep);
write!(&mut result, "{}", elt).unwrap();
}
result
}
}
}