Out of curiosity: Is there something equivalent to write!("{}", &mut output, vec.join(","))
that doesn't require an intermediate allocation of a String
? Something like vec.join_into(",", &mut output)
which takes and output stream?
Is there a similar intermediate-allocation free version of s += vec.join(",")
? (Of course, given the above, one could just use vec.join_into(",", &mut s)
if it existed.)