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

docs: add link to PollSender #3613

Merged
merged 3 commits into from Mar 16, 2021

Conversation

zaharidichev
Copy link
Contributor

Motivation

There was no link to PollSender in mpsc::Sender::send docs

Solution

Add link

Fix: #3611

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
@Darksonn Darksonn added A-tokio Area: The main tokio crate A-tokio-util Area: The tokio-util crate M-sync Module: tokio/sync T-docs Topic: documentation labels Mar 12, 2021
Comment on lines 317 to 318
/// Sends a value, waiting until there is capacity.
/// Sends a value, waiting until there is capacity. In case you need a
/// polling interface, use [`PollSender`].
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like the link to be in the same place in the docs as where I put the similar thing for Semaphore.

@@ -332,6 +333,7 @@ impl<T> Sender<T> {
///
/// [`close`]: Receiver::close
/// [`Receiver`]: Receiver
/// [`PollSender`]: https://docs.rs/tokio-util/0.6.4/tokio_util/sync/struct.PollSender.html
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// [`PollSender`]: https://docs.rs/tokio-util/0.6.4/tokio_util/sync/struct.PollSender.html
/// [`PollSender`]: https://docs.rs/tokio-util/0.6/tokio_util/sync/struct.PollSender.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why don't we just put /latest/ here instead of concrete version?

Copy link
Contributor

Choose a reason for hiding this comment

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

The link may break if we move it or remove it in future versions of tokio-util.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good to know, thanks!

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Comment on lines 312 to 315
/// To use the `Sender` in a poll function, you can use the [`PollSender`]
/// utility.
///
/// [`PollSender`]: https://docs.rs/tokio-util/0.6/tokio_util/sync/struct.PollSender.html
Copy link
Contributor

Choose a reason for hiding this comment

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

Put it on the struct, not the impl block.

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
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 A-tokio-util Area: The tokio-util crate M-sync Module: tokio/sync T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add link to PollSender on mpsc::Sender
3 participants