Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tuple support for Encodable/Decodable trait #13086

Closed
BurntSushi opened this issue Mar 22, 2014 · 0 comments · Fixed by #13095
Closed

tuple support for Encodable/Decodable trait #13086

BurntSushi opened this issue Mar 22, 2014 · 0 comments · Fixed by #13095

Comments

@BurntSushi
Copy link
Member

In the serialize crate, it seems that all implementations of tuples for the Encodable and Decodable traits are using {emit,read}_seq and {emit,read}_seq_elt. Should these implementations be using read_tuple (and others) instead? (It looks like read_tuple is never used.) Otherwise, using Encodable/Decodable it's impossible to distinguish between tuples and sequences.

bors added a commit that referenced this issue Mar 23, 2014
This commit moves from {read,emit}_seq for tuples to {read,emit}_tuple, as well
as providing a generalized macro for generating these implementations from one
invocation.

Closes #13086
flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant