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

Explicitly export rather than pub use mod::*. #364

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

waywardmonkeys
Copy link
Contributor

This makes it easier to see what the actual API is and what's coming from where.

This makes it easier to see what the actual API is and what's
coming from where.
Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The style I used in Xilem Core was:

mod whatever;
use whatever::{...};

mod something_else;
use something_else::{...};

But I'm generally in favour of this. We should probably have unreachable_pub enabled

Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, this is better. I can see I'm the one guilty of the original pattern, which dates back to the very first commit.

@waywardmonkeys waywardmonkeys added this pull request to the merge queue Aug 15, 2024
Merged via the queue into linebender:main with commit e9bb59d Aug 15, 2024
15 checks passed
@waywardmonkeys waywardmonkeys deleted the explicit-exports branch August 15, 2024 01:22
@waywardmonkeys
Copy link
Contributor Author

@DJMcNab That style felt too verbose here ... not sure why the difference in feel.

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

Successfully merging this pull request may close these issues.

3 participants