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

Split form_urlencoded into its own crate #607

Merged
merged 3 commits into from Jun 19, 2020
Merged

Conversation

@jplatte
Copy link
Contributor

jplatte commented Jun 16, 2020

Resolves #605.

I wasn't sure what version to give the new crate, so I went with 1.0.0.

@valenting valenting requested a review from SimonSapin Jun 18, 2020
@valenting
Copy link
Collaborator

valenting commented Jun 18, 2020

It all looks good to me but I asked @SimonSapin to also take a quick look.

form_urlencoded/src/lib.rs Outdated Show resolved Hide resolved
form_urlencoded/src/lib.rs Outdated Show resolved Hide resolved
@jplatte
Copy link
Contributor Author

jplatte commented Jun 19, 2020

@SimonSapin What should I do with the query_encoding module and decode_utf8_lossy?

@SimonSapin
Copy link
Member

SimonSapin commented Jun 19, 2020

EncodingOverride is the one item that needs to be shared. I’d rather have it reexported from the root of the crate(s) than adding a new module to the public API. As to encode, duplicating it is kinda unfortunate but it’s so short it could even be manually inlined.

* Move decode_utf8_lossy back into query_encoding
* Don't export the query_encoding module, but re-export EncodingOverride
  from it
@jplatte
Copy link
Contributor Author

jplatte commented Jun 19, 2020

EncodingOverride is the one item that needs to be shared. I’d rather have it reexported from the root of the crate(s) than adding a new module to the public API.

Done.

As to encode, duplicating it is kinda unfortunate but it’s so short it could even be manually inlined.

I manually inlined it in urls crate root. Should I inline it into its now only call site in form_urlencoded too?

src/query_encoding.rs Outdated Show resolved Hide resolved
@SimonSapin
Copy link
Member

SimonSapin commented Jun 19, 2020

Looks good, thanks!

@SimonSapin
Copy link
Member

SimonSapin commented Jun 19, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Jun 19, 2020

📌 Commit bd3922f has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Jun 19, 2020

Testing commit bd3922f with merge 55395ed...

@bors-servo
Copy link
Contributor

bors-servo commented Jun 19, 2020

☀️ Test successful - checks-travis
Approved by: SimonSapin
Pushing 55395ed to master...

@bors-servo bors-servo merged commit 55395ed into servo:master Jun 19, 2020
3 checks passed
3 checks passed
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
@SimonSapin
Copy link
Member

SimonSapin commented Jun 19, 2020

bors bot added a commit to nox/serde_urlencoded that referenced this pull request Aug 4, 2020
Merge #74
74: Use the new form_urlencoded crate instead of url r=nox a=jplatte

The `form_urlencoded` crate was created today to move out some of `url`s functionality for crates that don't need the rest, such as this one: servo/rust-url#607

Dep graph before:

![before](https://user-images.githubusercontent.com/951129/85187153-db797080-b29d-11ea-99c0-cfa228aa62bd.png)

Dep graph after:

![after](https://user-images.githubusercontent.com/951129/85187157-e46a4200-b29d-11ea-8505-018e67025191.png)

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.