Skip to content

Commit e31680a

Browse files
committed
auto merge of #17504 : danburkert/rust/tuple-serialization, r=alexcrichton
The tuple serialization logic should be using the tuple-specific emit function. This fixes part of #17158. The JSON encoder already proxies to `emit_seq_elt` when `emit_tuple_arg` is called, so this should have an effect.
2 parents bb66281 + fc58dcb commit e31680a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libserialize/serialize.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ macro_rules! tuple (
503503
$(let $name = $name; n += 1;)*
504504
s.emit_tuple(n, |s| {
505505
let mut i = 0;
506-
$(try!(s.emit_seq_elt({ i+=1; i-1 }, |s| $name.encode(s)));)*
506+
$(try!(s.emit_tuple_arg({ i+=1; i-1 }, |s| $name.encode(s)));)*
507507
Ok(())
508508
})
509509
}

0 commit comments

Comments
 (0)