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

Make example work with serde #131

Merged
merged 2 commits into from Mar 7, 2017
Merged

Make example work with serde #131

merged 2 commits into from Mar 7, 2017

Conversation

@slyrz
Copy link
Contributor

slyrz commented Mar 7, 2017

This PR makes the old example work with serde. It also replaces the asserts
with some output of the encoded/decoded structs, because asserts are boring and an example needs some action.

@ZoeyR
Copy link
Collaborator

ZoeyR commented Mar 7, 2017

I think the asserts were useful because it demonstrated the compactness of the bincode format without having to run the example. With the new design, the user would need to run the example to determine the size of the encoded data.

@TyOverby
Copy link
Collaborator

TyOverby commented Mar 7, 2017

@slyrz: Ah, thanks for the PR, can't believe I missed these!

Like @dgriffen said, I would prefer that the asserts are left as-is. The examples are mainly supposed to be read, not executed. (that said, they should still build and run).

@TyOverby
Copy link
Collaborator

TyOverby commented Mar 7, 2017

I do like the idea of printing the World at the end though. (I'd just keep the asserts as well)

@TyOverby
Copy link
Collaborator

TyOverby commented Mar 7, 2017

Thanks!

@TyOverby TyOverby merged commit 824f921 into servo:master Mar 7, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.