Skip to content

Add examples to the various methods of core::task::Poll #86598

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

Merged
merged 1 commit into from
Jul 4, 2021
Merged

Add examples to the various methods of core::task::Poll #86598

merged 1 commit into from
Jul 4, 2021

Conversation

yoshuawuyts
Copy link
Member

This improves the documentation of the various methods of core::task::Poll. These currently have fairly simple docs with no examples. This PR changes these methods to be closer to core::option::Option and adds usage examples (and importantly: tests!) to Poll's methods.

cc/ @rust-lang/wg-async-foundations

Screenshots

View generated rustdoc page Poll in core::task

@rust-highfive
Copy link
Contributor

r? @yaahc

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 24, 2021
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@tmandry tmandry added the A-async-await Area: Async & Await label Jun 30, 2021
@JohnTitor
Copy link
Member

Nice improvement, thanks!
r? @JohnTitor @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 4, 2021

📌 Commit a06ee82 has been approved by JohnTitor

@rust-highfive rust-highfive assigned JohnTitor and unassigned yaahc Jul 4, 2021
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 4, 2021
@bors
Copy link
Collaborator

bors commented Jul 4, 2021

⌛ Testing commit a06ee82 with merge b3d11f9...

@bors
Copy link
Collaborator

bors commented Jul 4, 2021

☀️ Test successful - checks-actions
Approved by: JohnTitor
Pushing b3d11f9 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 4, 2021
@bors bors merged commit b3d11f9 into rust-lang:master Jul 4, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 4, 2021
@yoshuawuyts yoshuawuyts deleted the poll-method-docs branch July 6, 2021 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await Area: Async & Await merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants