Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd url_serde crate with ser/de support for url::Url type #274
Conversation
|
Looks good! A couple small things… |
| license = "MIT/Apache-2.0" | ||
|
|
||
| [dependencies] | ||
| serde = ">=0.9, <0.10" |
This comment has been minimized.
This comment has been minimized.
SimonSapin
Jan 27, 2017
Member
This is equivalent to "0.9", so please use that. Same for serde_json below.
| ``` | ||
| struct MyStruct { | ||
| #[serde(deserialize_with = "url_serde::deserialize", |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mhristache
Jan 27, 2017
Author
Contributor
Yes, it does. I would like to add a test case for it but it will need rust nightly until rust 1.15 is released. Is it ok to have a test that run on nightly only?
This comment has been minimized.
This comment has been minimized.
SimonSapin
Jan 27, 2017
Member
We want to keep running the rest of the tests on stable Rust on Travis. We could add a Cargo feature and enable it based on $TRAVIS_RUST_VERSION, but I think it’s not worth the bother. I ok with just the non-automated test that you did.
|
|
||
| /// Serialises `value` with a given serializer. | ||
| /// | ||
| /// This is useful to serialize Hyper types used in structure fields or |
This comment has been minimized.
This comment has been minimized.
| /// Serialises `value` with a given serializer. | ||
| /// | ||
| /// This is useful to serialize Hyper types used in structure fields or | ||
| /// tuple members with `#[serde(serialize_with = "hyper_serde::serialize")]`. |
This comment has been minimized.
This comment has been minimized.
| } | ||
|
|
||
|
|
||
| #[test] |
This comment has been minimized.
This comment has been minimized.
SimonSapin
Jan 27, 2017
Member
Please add a (cd url_serde && cargo test) line after (cd idna && cargo test) in Makefile, so that this test is run on Travis-CI. (Note that the indentation needs to be an actual tab character, not spaces.)
| authors = ["The rust-url developers"] | ||
|
|
||
| description = "Serde support for URL types" | ||
| documentation = "http://servo.github.io/rust-url/url/index.html" |
This comment has been minimized.
This comment has been minimized.
|
PR updated with your comments @SimonSapin |
|
Looks great, thanks! @bors-servo r+ |
|
|
|
|
Add url_serde crate with ser/de support for url::Url type This is fixing #273 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/274) <!-- Reviewable:end -->
|
And it’s up: https://crates.io/crates/url_serde |
mhristache commentedJan 27, 2017
•
edited by larsbergstrom
This is fixing #273
This change is