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

util: fix import path of CancellationToken in example code #4520

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tokio-util/src/sync/cancellation_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use guard::DropGuard;
///
/// ```ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change this so that they are actually compiled. (There are multiple instances of this in the file.)

Suggested change
/// ```ignore
/// ```no_run

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your review :)
I changed and pushed those 👍

/// use tokio::select;
/// use tokio::scope::CancellationToken;
/// use tokio_util::sync::CancellationToken;
///
/// #[tokio::main]
/// async fn main() {
Expand Down Expand Up @@ -174,7 +174,7 @@ impl CancellationToken {
///
/// ```ignore
/// use tokio::select;
/// use tokio::scope::CancellationToken;
/// use tokio_util::sync::CancellationToken;
///
/// #[tokio::main]
/// async fn main() {
Expand Down