Skip to content

Update to Serde 0.9. #73

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

Merged
merged 3 commits into from
Feb 3, 2017
Merged

Update to Serde 0.9. #73

merged 3 commits into from
Feb 3, 2017

Conversation

jimmycuadra
Copy link
Contributor

Serde 0.9 was recently released and required a few changes to update.

@FlashCat
Copy link
Contributor

Thanks for the pull request, and welcome! The contain-rs team is excited to review your changes, and you should hear from @huonw (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

@jimmycuadra
Copy link
Contributor Author

Clippy doesn't seem to have been updated for the latest nightly Rust, but my changes should be okay without clippy passing.

src/serde.rs Outdated
@@ -55,15 +57,19 @@ impl<K, V> Visitor for LinkedHashMapVisitor<K, V>
{
type Value = LinkedHashMap<K, V>;

fn expecting(&self, formatter: &mut Formatter) -> FmtResult {
write!(formatter, "linked hash map")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to keep it simple and say "a map" here. This is what we do for the built-in impls - BTreeMap and HashMap.

An example of a message you get from this is:

invalid type: string "xyz", expected linked hash map

The user is not responsible for figuring out how to represent a linked hash map in their format. They should just see:

invalid type: string "xyz", expected a map

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion! Updated.

@dtolnay
Copy link
Contributor

dtolnay commented Feb 3, 2017

r? @apasel422

@apasel422
Copy link
Contributor

This looks fine to me, but Travis is still failing on nightly. Some other problem with clippy?

@dtolnay
Copy link
Contributor

dtolnay commented Feb 3, 2017

Clippy has not been updated to the most recent nightly yet. You can follow along here: https://github.com/Manishearth/rust-clippy/pull/1505. It is not related to this PR.

@apasel422 apasel422 merged commit 4fbb8ea into contain-rs:master Feb 3, 2017
@jimmycuadra jimmycuadra deleted the serde-0.9 branch February 4, 2017 01:09
@jimmycuadra
Copy link
Contributor Author

Thanks for merging! Would someone release a new version to crates.io, please?

@apasel422
Copy link
Contributor

Published on crates.io as 0.4.0.

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 this pull request may close these issues.

5 participants