-
Notifications
You must be signed in to change notification settings - Fork 59
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
Conversation
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. |
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") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion! Updated.
r? @apasel422 |
This looks fine to me, but Travis is still failing on nightly. Some other problem with clippy? |
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. |
Thanks for merging! Would someone release a new version to crates.io, please? |
Published on crates.io as 0.4.0. |
Serde 0.9 was recently released and required a few changes to update.