Skip to content

Commit

Permalink
auto merge of rust-lang#17504 : danburkert/rust/tuple-serialization, …
Browse files Browse the repository at this point in the history
…r=alexcrichton

The tuple serialization logic should be using the tuple-specific emit function.  This fixes part of rust-lang#17158.  The JSON encoder already proxies to `emit_seq_elt` when `emit_tuple_arg` is called, so this should have an effect.
  • Loading branch information
bors committed Sep 26, 2014
2 parents bb66281 + fc58dcb commit e31680a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libserialize/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ macro_rules! tuple (
$(let $name = $name; n += 1;)*
s.emit_tuple(n, |s| {
let mut i = 0;
$(try!(s.emit_seq_elt({ i+=1; i-1 }, |s| $name.encode(s)));)*
$(try!(s.emit_tuple_arg({ i+=1; i-1 }, |s| $name.encode(s)));)*
Ok(())
})
}
Expand Down

0 comments on commit e31680a

Please sign in to comment.