fix comma list

This commit is contained in:
Aleksey Kladov 2018-08-28 21:48:14 +03:00
parent e6ab53619b
commit 6effddb18c

View file

@ -110,9 +110,9 @@ fn comma_list(buf: &mut String, bra: &str, ket: &str, items: impl Iterator<Item=
let mut first = true; let mut first = true;
for item in items { for item in items {
if !first { if !first {
first = false;
buf.push_str(", "); buf.push_str(", ");
} }
first = false;
write!(buf, "{}", item).unwrap(); write!(buf, "{}", item).unwrap();
} }
buf.push_str(ket); buf.push_str(ket);