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

Remove http header re-exports from crate root #264

Closed
yoshuawuyts opened this issue Oct 31, 2020 · 3 comments
Closed

Remove http header re-exports from crate root #264

yoshuawuyts opened this issue Oct 31, 2020 · 3 comments
Labels
semver-major This change requires a semver major change
Milestone

Comments

@yoshuawuyts
Copy link
Member

We currently export the following headers from the crate root:

Screenshot_2020-10-31 http_types - Rust(2)

A majority of these are re-exports from our sub-modules. As our index is growing because of the addition of a variety of typed headers I would like to trim down some of these re-exports and leave them accessible only as part of the sub-modules. The types to keep would be only the types required to construct a request / response, or types that don't currently already have a dedicated submodule:

keep

  • Body core type
  • Error core type
  • Extensions no dedicated submodule
  • Request core type
  • Response core type
  • Url core type (for now; revisit after the TryFrom patch on url is published)

move to submodule

  • Cookie has submodule, not critical
  • Headers rarely referenced directly, and when used it's in conjunction with other header types
  • Mime (rename to MediaType (see rename Mime to MediaType #251 )
  • Trailers has a submodule and uncommonly used
@yoshuawuyts yoshuawuyts added the semver-major This change requires a semver major change label Oct 31, 2020
@Fishrock123 Fishrock123 added this to the 3.0 milestone Nov 25, 2020
@brightly-salty
Copy link
Contributor

I'd be willing to attempt to implement this and submit a PR. Is this what is needed?

  • remove pub use crate::cookies::Cookie from src/lib.rs
  • remove pub use mime::Mime from src/lib.rs
  • remove pub use trailers::Trailers; from src/lib.rs
  • remove pub use headers::Headers from src/lib.rs

@yoshuawuyts
Copy link
Member Author

@brightly-salty yes indeed!

@joshtriplett
Copy link
Member

Fixed by #305.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major This change requires a semver major change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants