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

Add "Serialize a URL" example for url/serde crates #38

Closed
brson opened this issue May 4, 2017 · 5 comments
Closed

Add "Serialize a URL" example for url/serde crates #38

brson opened this issue May 4, 2017 · 5 comments

Comments

@brson
Copy link
Contributor

brson commented May 4, 2017

Serializing urls with serde 1.0 is kinda weird, so maybe worth an example.

@brson brson mentioned this issue May 4, 2017
7 tasks
@brson brson changed the title Add "Serialize a URL with serde" example for url/serde crates Add "Serialize a URL" example for url/serde crates May 5, 2017
@budziq
Copy link
Collaborator

budziq commented May 9, 2017

Hi,

I am not sure what is the exact idea for this example.
Until rust-url crate officially moves to serde-1.0 servo/rust-url#327 the best that I've come up with is usage of auxiliary url_serde crate (but it would require adding it to Cargo.toml). Does it look ok? https://play.integer32.com/?gist=8199915f140db644a8bc3e480e582aea&version=undefined

If yes, I will make a PR.

cc @dtolnay

@dtolnay
Copy link
Member

dtolnay commented May 9, 2017

I would prefer to wait until we no longer need to use the roundabout approach. @SimonSapin

@budziq
Copy link
Collaborator

budziq commented May 9, 2017

Will do. Thanks for your time :)

@budziq
Copy link
Collaborator

budziq commented May 16, 2017

Judging from the original description I guess that the main reason for this example was the required roundabout approach.
Once servo/rust-url#327 is merged then the Url will serialize just like any other well behaved type and this example would be redundanta with https://brson.github.io/rust-cookbook/encoding.html.
So maybe just close this issue? @dtolnay

@dtolnay
Copy link
Member

dtolnay commented May 16, 2017

Yes I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants