json bugfix
This commit is contained in:
parent
394f8eeb7e
commit
0e9495b980
@ -130,12 +130,11 @@ pub impl Encoder: serialize::Encoder {
|
|||||||
// element provides the enum variant name
|
// element provides the enum variant name
|
||||||
self.wr.write_char('[');
|
self.wr.write_char('[');
|
||||||
self.wr.write_str(escape_str(name));
|
self.wr.write_str(escape_str(name));
|
||||||
self.wr.write_char(',');
|
|
||||||
f();
|
f();
|
||||||
self.wr.write_char(']');
|
self.wr.write_char(']');
|
||||||
}
|
}
|
||||||
fn emit_enum_variant_arg(&self, idx: uint, f: fn()) {
|
fn emit_enum_variant_arg(&self, idx: uint, f: fn()) {
|
||||||
if idx != 0 {self.wr.write_char(',');}
|
self.wr.write_char(',');
|
||||||
f();
|
f();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user