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

Export types and not modules. #70

Closed
wants to merge 1 commit into from
Closed

Export types and not modules. #70

wants to merge 1 commit into from

Conversation

@RazrFalcon
Copy link
Collaborator

RazrFalcon commented May 28, 2019

This is mainly a stylistic change, since I don't think that we need a complex modules structure for like 20 types. And this more Rust-like, imo.

@RazrFalcon RazrFalcon requested a review from pcwalton May 28, 2019
@pcwalton
Copy link
Collaborator

pcwalton commented May 28, 2019

I deliberately don't like doing this in crates that I maintain, because the compiler is not very good at saying where you should import a type from in error messages. Also, when I read library code as a user of the library, I like to be able to look at the "use" directives to see where the public types live, without having to search for "pub use". I find that a lot of Rust crates overuse "pub use" and it makes them really confusing, and I don't want to make it worse.

@RazrFalcon
Copy link
Collaborator Author

RazrFalcon commented May 29, 2019

I see. That was just a proposal.

@RazrFalcon RazrFalcon closed this May 29, 2019
@RazrFalcon RazrFalcon deleted the export-types branch May 29, 2019
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.

None yet

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