json bugfix

This commit is contained in:
John Clements 2013-02-07 14:39:02 -08:00
parent 394f8eeb7e
commit 0e9495b980

View File

@ -130,12 +130,11 @@ pub impl Encoder: serialize::Encoder {
// element provides the enum variant name
self.wr.write_char('[');
self.wr.write_str(escape_str(name));
self.wr.write_char(',');
f();
self.wr.write_char(']');
}
fn emit_enum_variant_arg(&self, idx: uint, f: fn()) {
if idx != 0 {self.wr.write_char(',');}
self.wr.write_char(',');
f();
}