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

Add #[must_use] to more types #1600

Merged
merged 2 commits into from May 14, 2019
Merged

Add #[must_use] to more types #1600

merged 2 commits into from May 14, 2019

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented May 11, 2019

Also fixes some #[must_use] messages.

EDIT: also updates #[must_use] message of impl Future types.

@@ -6,7 +6,7 @@ use pin_utils::{unsafe_pinned, unsafe_unpinned};

/// Future for the [`try_for_each`](super::TryStreamExt::try_for_each) method.
#[derive(Debug)]
#[must_use = "streams do nothing unless polled"]
Copy link
Member

Choose a reason for hiding this comment

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

I'd still expect the streams to say "streams do nothing ... "

Copy link
Member Author

Choose a reason for hiding this comment

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

TryForEach implements the future, not the stream: https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.16/futures/stream/struct.TryForEach.html#impl-Future

(The types that implement the stream are keeping that description.)

Copy link
Member

Choose a reason for hiding this comment

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

hoh boy thank you

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.

None yet

2 participants