-
Notifications
You must be signed in to change notification settings - Fork 334
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
Add impl Serialize and Deserialize for Option<Url> #279
Conversation
Looks good! A couple changes… Reviewed 3 of 3 files at r1. .gitignore, line 4 at r1 (raw file):
What’s this? If it’s a file you have locally unrelated to anything in the repo, please use url_serde/src/lib.rs, line 102 at r1 (raw file):
I think this can be made generic, please do so: impl<'a, T> Serialize for Ser<'a, Option<T>> where Ser<'a, T>: Serialize It can help if/when we add serde support for more url_serde/src/lib.rs, line 154 at r1 (raw file):
Same as above. Comments from Reviewable |
.gitignore, line 4 at r1 (raw file): Previously, SimonSapin (Simon Sapin) wrote…
When defining a project in Intellij Idea IDE it creates a .idea folder where it stores all the settings. I thought it's useful to ignore it as Idea IDE is becoming more and more popular for Rust development. That said, I don't mind taking it away. Comments from Reviewable |
Review status: all files reviewed at latest revision, 3 unresolved discussions. .gitignore, line 4 at r1 (raw file): Previously, maximih (Maximilian Hristache) wrote…
There’s an unbounded number of IDEs in the world. I think Intellij users should rather use a global (to them) https://help.github.com/articles/ignoring-files/#create-a-global-gitignore Comments from Reviewable |
url_serde/src/lib.rs, line 102 at r1 (raw file): Previously, SimonSapin (Simon Sapin) wrote…
I am hitting E0275 (error[E0275]: overflow evaluating the requirement Comments from Reviewable |
r+ with the .gitignore change removed. Review status: all files reviewed at latest revision, 2 unresolved discussions. url_serde/src/lib.rs, line 102 at r1 (raw file): Previously, maximih (Maximilian Hristache) wrote…
This might be a rustc bug. I’ve filed rust-lang/rust#39959. In the meantime, leave you impls as-is, we can make them generic later if it’s a bug an when the bug is fixed. Comments from Reviewable |
This commit is adding impl Serialize and Deserialize for Option<Url> which is intended to be used with serde serliaze_with and deserialize_with for derived ser/deser when an url field is optional. This commit is also adding some tests for derived Serialize and Deserialize via serde serialize_with and deserialize_with, as custom_derive is stable since rust 1.15.
@SimonSapin .gitignore change was removed |
@bors-servo r+ Reviewed 1 of 1 files at r2. Comments from Reviewable |
📌 Commit 599b97d has been approved by |
@SimonSapin thanks for your time! Can you also push |
Normally a bot should run CI and merge automatically. But that seems broken at the moment, and I don’t know why. https://travis-ci.org/servo/rust-url/builds/203163348 is green, I merged manually. 0.1.2 is now on crates.io |
This commit is adding impl Serialize and Deserialize for Option
which is intended to be used with serde serliaze_with and
deserialize_with for derived ser/deser when an url field is optional.
This commit is also adding some tests for derived Serialize and
Deserialize via serde serialize_with and deserialize_with, as
custom_derive is stable since rust 1.15.
This change is