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

time: move error types into time::error #2938

Merged
merged 3 commits into from Oct 12, 2020
Merged

Conversation

alce
Copy link
Member

@alce alce commented Oct 9, 2020

@taiki-e taiki-e mentioned this pull request Oct 9, 2020
21 tasks
@Darksonn Darksonn added A-tokio Area: The main tokio crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. M-time Module: tokio/time labels Oct 9, 2020
@@ -99,7 +99,7 @@ pub use sleep::{sleep, sleep_until, Sleep};
pub(crate) mod driver;

mod error;
pub use error::Error;
pub use error::{Elapsed, Error};
Copy link
Member

Choose a reason for hiding this comment

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

This import should be removed. Then we can avoid cluttering the main namespace with error types :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed. Hopefully I understood correctly how they should be exposed.

Copy link
Member

Choose a reason for hiding this comment

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

btw @alce I think he means just doing pub mod error then you can address each error variant via error::Elapsed etc.

tokio/src/time/error.rs Outdated Show resolved Hide resolved
@carllerche carllerche merged commit 0893841 into tokio-rs:master Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. M-time Module: tokio/time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants