-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[WIP] async
and .await
chapter
#3909
Closed
Closed
Changes from 169 commits
Commits
Show all changes
214 commits
Select commit
Hold shift + click to select a range
0ec7296
Create crate for The Rust Programming Language
chriskrycho fcd470c
Add Tokio dependency
chriskrycho 3943e51
Re-export `tokio::main` as `trpl::async_main` and test it.
chriskrycho e518289
Add more crate-level docs and matching README materials.
chriskrycho 608c35b
Document the first test so people can understand it.
chriskrycho 71ea12e
Add CI for `main` and PRs against `main`
chriskrycho 4255d87
Add a CI status badge
chriskrycho 7c40849
Add new Chapter 17: Async and Await
chriskrycho c1a0d14
Ch. 17: introduction section
chriskrycho d17c712
Ch. 17: Expand introduction and add stub for tasks chapter
chriskrycho 4ce722d
Ch. 17: Fix a couple typos and incomplete sentences
chriskrycho 71d92ec
Ch. 17: Add some introductory material about async/await
chriskrycho fdb3794
Ch. 17: Introduce runtimes and the `trpl` crate
chriskrycho cf00f05
Use “asynchronous programming” or “async”, not “async-await”
chriskrycho 02b0bd1
Add note about Async Book ch. 4: Pinning
chriskrycho 94d95c6
Ch. 17: Explain what `Poll::Pending` and `Poll::Ready(T)` mean.
chriskrycho b4bcb2c
Ch. 17: add a TODO for the `async fn` desugaring
chriskrycho 63baf22
Ch. 17: fix a misplaced period
chriskrycho c31d308
Ch. 17: get to working async code sooner
chriskrycho 0721b04
Merge `main` into `only-new-async`
chriskrycho dee7220
Ch. 17: add to table of contents so `mdbook serve` is useful
chriskrycho 5b3c27e
Ch. 17: clarify language about Tokio
chriskrycho ebebf8c
Ch. 17: use `trpl`, not `futures`, even for initial code samples
chriskrycho ee0704d
Ch. 17: text/code ordering fix in 17.02
chriskrycho 40df049
Prepare to integrate into TRPL repo
chriskrycho a150365
Ch. 17: merge in trpl crate
chriskrycho 45bda34
Merge `main` into `only-new-async`
chriskrycho 8f6bcc7
Ch. 17: expand, clarify, and restructure 17.01
chriskrycho 0c00b17
Ch. 17: reorganize 17.01 and get a useable intro to Future
chriskrycho 23027cb
Ch. 17: wording and formatting in 17.01
chriskrycho 3cf4fae
Ch. 17: corrections/discussion on runtimes, mostly
chriskrycho c3ebabe
Ch. 17: pull disconnected material out of 17.01
chriskrycho 5657a49
Ch. 17: minor wording improvement
chriskrycho dbd5e14
Ch. 17: use `Listing` for all existing listings
chriskrycho b4e3030
Ch. 17: eliminate duplicate runtime description
chriskrycho 96fd725
Merge `main` into `only-new-async`
chriskrycho 95105d2
Ch. 17: Add `futures` to `trpl` crate for re-exports
chriskrycho f418ceb
Ch. 17: abandon attempt to re-export `tokio::main`
chriskrycho 8e7420e
Ch. 17: start in earnest on §2, showing relation to threads
chriskrycho 1ee7975
Ch. 17: add more examples and explanation to §02.
chriskrycho 9c1f4c8
Ch. 17: Finish 'Counting', start on 'Async Move Blocks'
chriskrycho dacddb5
Merge `main` into `only-new-async`
chriskrycho c1c3c7f
Ch. 17: start on message-passing and `async move` in §2
chriskrycho 4b7886e
Ch. 17: Finish a pass on Message Passing example
chriskrycho b835c07
Merge `main` into `only-new-async`
chriskrycho 5e09f02
Merge `main` into `only-new-async`
chriskrycho 5483299
Exclude `trpl` from workspace
chriskrycho acde825
Ch. 17: skip `main` and `trpl::block_on` in some listings
chriskrycho 7b14d7d
Ch. 17: inline some note content and fix some phrasing
chriskrycho 89b3b25
Merge `main` into `only-new-async`
chriskrycho 1d7c987
Ch. 17: Rewrite listings to be more similar to Ch. 16
chriskrycho 1db4ee2
Ch. 17: wording and structure tweaks
chriskrycho af18d2b
Ch. 17: show multiple producers working with `clone`
chriskrycho b3fe5b7
Merge `main` into `only-new-async`
chriskrycho c1847bf
Ch. 17: restructure §00 and start better motivating async
chriskrycho 1010b1f
Ch. 17: further motivation for async w/examples
chriskrycho 8ce6c8a
Ch. 17: rework §00 to talk about reads instead of writes
chriskrycho 52bf9e4
Ch. 17: extract parallelism discussion from §00 to §03
chriskrycho 3224ceb
Ch. 17: dedicate §03 to 'Futures, Tasks, and Threads'
chriskrycho 82f47c3
Ch. 17: Listings are all `17-*`!
chriskrycho 91ffec8
Ch. 17: Fill out message-passing example
chriskrycho d3d7c64
Merge `main` into `only-new-async`
chriskrycho 91348ca
Ch. 17: A minor wording improvement
chriskrycho 068f30b
Ch 17.02: motivating `futures::join!` and `Box::pin`
chriskrycho 7a5bdb2
Ch. 17: finish motivating `Pin` and `pin!`
chriskrycho 626aec8
Ch. 17: A small wording tweak about `JoinAll` in §03
chriskrycho 40a3dc1
Merge `main` into `only-new-async`
chriskrycho b382767
Ch. 17: Start building out explanation of `Pin`
chriskrycho e000ea3
Ch. 17: Iterate on explanation of `Pin` and `Unpin`
chriskrycho 0032e07
Ch. 17: iterate on §02 examples, extract “extra” material
chriskrycho 4236371
Ch. 17: Explain `join!` in §02
chriskrycho 97f5bcc
Ch. 17 §02: Clarify the `move` discussion
chriskrycho 888a519
Merge `main` into `only-new-async`
chriskrycho c6965ca
Ch. 17 §02: Start showing timeouts
chriskrycho c58f943
Ch. 17 §02: Start on example of select.
chriskrycho 7da440a
Ch. 17 §02: Implement `timeout` example and building blocks
chriskrycho 270780a
Ch. 17: build a `retry` implementation
chriskrycho 1c27c97
Ch. 17: Drop material about `retry`, since it is a hazard
chriskrycho 71acd6d
Ch. 17 §02: Write about `race` and `yield_now`
chriskrycho 5a0fb42
Ch. 17: Split the over-long §02 into two parts
chriskrycho 86835d6
Ch. 17: Show worked example of implementing `timeout`
chriskrycho a364865
Ch. 17 §04: Show perforance of `sleep` vs. `yield_now`
chriskrycho f4cd9d2
Ch. 17 §01: rephrase note about the details we don’t get into
chriskrycho b5010d1
Ch. 17 §01: Add necessary background for §04 to make sense
chriskrycho 13adef4
Ch. 17 §04: Explain the *implications* of yielding to motivate it
chriskrycho 54a18a7
Ch. 17 §04: explain yield better and rework examples
chriskrycho e56e906
Ch. 17 §04: Add a good transition sentence
chriskrycho 95422ab
Ch. 17 §04: add a Note about cooperative multitasking
chriskrycho b3931ef
Ch. 17 §03: Add more explanatory material on `Pin`
chriskrycho 8809d9f
Ch. 17: a better name for one of the internal sections
chriskrycho 121f5b6
Ch. 17 §03: Explain pinning and `Deref` just enough
chriskrycho a97358e
Ch. 17 §03: Finish a first pass on explaining `Pin`
chriskrycho 644bc54
Ch. 17 §04: Code sample and incomplete sentence fixes
chriskrycho b796ff8
Merge `main` into `only-new-async`
chriskrycho f786162
Ch. 17 §04: Give the section a reasonable title
chriskrycho 39485b9
Merge `main` into `only-new-async`
chriskrycho 617b755
Ch. 17: an editing pass on §00 and the start of §01
chriskrycho 2360484
Ch. 17: reduce dependency list for `trpl` crate
chriskrycho 5458a6a
Ch. 17: correct listing numbers for §01
chriskrycho 217645e
Ch. 17 §01: flag a TODO item for later
chriskrycho c310f54
Ch. 17: Finish (first pass) documentation for `trpl::race`
chriskrycho 69323d9
Ch. 17 §02: correct numbering and content for Listing 17-04
chriskrycho dc0ce20
Merge `main` into `only-new-async`
chriskrycho ccd6808
Ch. 17 §02: correct numbering and content for Listing 17-05
chriskrycho 4c4ebb7
Ch. 17 §02: correct numbering and content for Listing 17-06
chriskrycho 4c41d8f
Ch. 17 §02: remove listing that I split into multiple parts
chriskrycho 6fd549d
Ch. 17 §02: correct numbering and content for Listing 17-07
chriskrycho bd26083
Ch. 17 §02: leave a TODO about one bucket of output
chriskrycho 6d802a0
Ch. 17 §02: correct numbering and content for Listings 17-08 and 17-09
chriskrycho 38ddc49
Ch. 17 §02: correct numbering and content for Listings 17-10 and 17-11
chriskrycho 60cde00
Ch. 17 §02: correct numbering and content for Listing 17-12
chriskrycho 7e5b6f2
Ch. 17 §02: correct numbering and content for Listings 17-13 and 17-14
chriskrycho 766ad04
Ch. 17 §02: correct numbering and content for Listings 17-15 and 17-16
chriskrycho c308400
Ch. 17 §03: correct numbering and content for Listings 17-17
chriskrycho 6035ba4
Ch. 17 §03: correct numbering and content for Listing 17-18
chriskrycho a1eb8ae
Ch. 17: Fix internal links
chriskrycho 911167d
Ch. 17: Remove completed `TODO` for `Pin` 🎉
chriskrycho b8ecdb5
Ch. 17 §03: extract a no-listing for type mismatches
chriskrycho 2b65e53
Ch. 17 §03: correct numbering and content for Listings 17-19 and 17-20
chriskrycho 67bd0a0
Ch. 17 §03: support code for motivating `Pin`
chriskrycho 686b3e4
Ch. 17 §03: add a TODO for checking Pin description correctness
chriskrycho 91565da
Ch. 17 §03: correct listings and wording for `Pin` materials
chriskrycho fb683c9
Ch. 17 §03: correct listings and wording for first half of section
chriskrycho 9d8f2c5
Ch. 17: renumber listings to eliminate `no-listing` listings
chriskrycho 4f93e8b
Ch. 17: finish listing numbers for §04
chriskrycho d73e893
Merge `main` into `only-new-async`
chriskrycho 4598e2c
Ch. 17 §01: make the conclusion section coherent
chriskrycho c0c24e2
Ch. 17 §02: transition for §03 and TODO cleanup
chriskrycho 74df84e
Ch. 17: Add a new §05 on Stream and AsyncIterator
chriskrycho f0825ad
Ch. 17 S§02: introduce and explain `while let` syntax.
chriskrycho a05c34e
Ch. 17 §05: Introduce `Stream` and drop `AsyncIterator`
chriskrycho ad360d7
Ch 17. §01: leave a TODO about `IntoFuture`
chriskrycho 52c516c
Ch. 17 §05: start explaining how we work with streams
chriskrycho e3ab302
Ch. 17: Remove a now-properly-numbered listing
chriskrycho cd1a3f7
Merge `main` into `only-new-async`
chriskrycho bf5e4aa
Ch. 17 (infra): add a base listing to use when generating new ones
chriskrycho e790c2c
Ch. 17: re-export `Stream`, `StreamExt`, and `stream_iter` in `trpl`
chriskrycho ce9b286
Ch. 17 §05: describe how to use `Stream`s with `Iterator`s
chriskrycho b4f5763
Ch. 17: final example for §05, with more re-exported streams
chriskrycho e71b667
Ch. 17 §05: First part of final example, with `ReceiverStream`
chriskrycho 3c6c32c
Ch. 17 §05: complete example with `throttle` and `take`
chriskrycho bea8557
Ch. 17 §06: Start discussing future/task/thread tradeoffs
chriskrycho a8fe2d6
Merge `main` into `only-new-async`
chriskrycho bdd8f3e
Ch. 17 §06: more on tasks and threads, better example
chriskrycho ffb2d1b
Ch. 17: Most of §06 drafted, needs a conclusion
chriskrycho 63214c3
Ch. 17 §00: rewrite the parallelism and concurrency section
chriskrycho 6914bc4
Ch. 17 §00: no more cooks!
chriskrycho e774613
Ch. 17: remove 'base' listing
chriskrycho f039ca3
Ch. 17: Transition materials from Ch. 16 and into Ch. 18
chriskrycho 5fdd92c
Ch. 17§00 initial edits
chriskrycho f023032
Ch. 17: add some more explanatory comments to `trpl`
chriskrycho eec1745
Ch. 17§01 initial edits for the first subsection
chriskrycho e238342
Ch. 17§01 initial edits for the second subsection
chriskrycho 09b80f9
Ch. 17§02 initial edits on 'Counting'
chriskrycho e5c9afd
Ch. 17§02 initial edits on 'Message Passing'
chriskrycho 89920d5
Ch. 17§03 Initial edits on opening section
chriskrycho 451f77b
Ch. 17§03 initial edits on pinning section
chriskrycho 1cc4dbe
Ch. 17§03: Rename the section for clarity
chriskrycho cc0f913
Ch. 17: remove now unused Listing 17-24
chriskrycho 1030015
Ch. 17§04 initial edits on intro and “Yielding” section
chriskrycho ef1ed96
Ch. 17§04 initial edits on Building Our Own Async Abstractions
chriskrycho 074c442
Ch. 17§05 initial edits on first two sections
chriskrycho 1a90722
Merge `main` into `async-edits`
chriskrycho fbcdb24
Ch. 17§05 initial edits on 'Composing Streams'
chriskrycho 2797d95
Ch. 17§05 initial edits on 'Merging Streams'
chriskrycho 92c19ce
Ch. 17§06 initial edits
chriskrycho c3c88e4
Ch. 17 §03: restore accidentally-removed Listing 17-14
chriskrycho 22b04c1
infra: prepare `trpl` crate for 0.1.0 release
chriskrycho 58fff3c
Ch. 17§03: fix typo
chriskrycho 130e6d0
Ch. 17: correct wrapping for a `Note`
chriskrycho dc8d7e8
Merge `main` into `async-edits`
chriskrycho bb9cdbb
Ch. 17: Update CI config to support testing the book with `trpl`
chriskrycho 24ed6e4
Ch. 17§01: Make code/listings pass tests
chriskrycho deefe4d
Ch. 17§02: Make code/listings pass tests
chriskrycho 6a0d072
Ch. 17§03: Make code/listings pass tests
chriskrycho 0aacb80
Ch. 17§04: Make code/listings pass tests
chriskrycho 40bdda7
Ch. 17§05: Make code/listings pass tests
chriskrycho 5099e5f
Ch. 17§06: Make code listing pass tests and add a caption
chriskrycho 45f1635
Ch. 17: fix spelling issues
chriskrycho 463b819
Ch. 17: fix internal links with new ch. order
chriskrycho 79fd5e2
Merge `main` into `async-edits`
chriskrycho 644dbab
Ch. 17: fix an internal link reference
chriskrycho b2a2133
Merge `main` into `async-edits`
chriskrycho e669250
Ch. 17§00: phrasing/wording-level improvements
chriskrycho 133bb61
Ch. 17§00: phrasing/wording-level improvements
chriskrycho 4044534
Ch. 16: avoid slightly-dismissive language in transition
chriskrycho eb41efb
Ch. 17§00: rework the introduction based on initial reviews
chriskrycho cfaf187
Ch. 17: diagrams for concurrent and parallel execution
chriskrycho 472f152
Ch. 17: fix diagrams and embed them in the text
chriskrycho fb718b3
Merge `main` into `async-edits`
chriskrycho ddad349
Merge `async-edits` into `only-new-async`
chriskrycho a42f27b
Ch. 17: Fix up diagrams
chriskrycho f812ed0
Ch. 17§00: second round of edits
chriskrycho 1de14c8
Ch. 17: start restructuring chapter
chriskrycho c552952
Ch. 17: rename `trpl::block_on` to `trpl::run`
chriskrycho cd12a1e
Ch. 17: more edits for first three sections
chriskrycho 487c81d
Merge `main` into `async-edits` (Rust 1.81 update)
chriskrycho 9b13b95
Upgrade Ch. 17 listings for Rust 1.81
chriskrycho 3cfdf2d
Ch. 17: rework 17.03 (and overall structure) from my own analysis
chriskrycho 97902d5
Ch. 17: rework 17.04 with my own edits and analysis
chriskrycho 68049c6
Ch. 17: rework 17.05 with my own edits and analysis
chriskrycho 0d8da8b
Ch. 17: fold together 17.03 and 17.04
chriskrycho 7da825f
Ch. 17: Make the new 17.05 actually work as a deep dive!
chriskrycho 6bdf1b7
Merge `main` into `async-edits`
chriskrycho 1d3517c
Ch. 17: integrate a number of the outstanding review comments
chriskrycho c4d02bf
Ch. 17: address the rest of James’ review comments 🎉
chriskrycho c35b7d9
Ch. 17: address most of the rest of Carol's outstanding comments
chriskrycho 453247c
Ch. 17: address Tim and Carol's outstanding comments
chriskrycho ccafd06
Ch. 17: Fix some typos!
chriskrycho 6f5773e
Remove duplicate integration test from root
chriskrycho cc5db97
Ch. 17: rewrite 17.01 with a better example
chriskrycho 573a6ca
Ch. 17: fix mdbook test output
chriskrycho b265249
Ch. 17: Fix spelling and internal links
chriskrycho 25ca8a1
Merge `async-edits` into `only-new-async`
chriskrycho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[package] | ||
name = "async_await" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$ cargo run | ||
Compiling async_await v0.1.0 (/Users/chris/dev/rust-lang/book/listings/ch17-async-await/listing-17-01) | ||
warning: unused implementer of `Future` that must be used | ||
--> src/main.rs:3:5 | ||
| | ||
3 | hello("async"); | ||
| ^^^^^^^^^^^^^^ | ||
| | ||
= note: futures do nothing unless you `.await` or poll them | ||
= note: `#[warn(unused_must_use)]` on by default | ||
|
||
warning: `async_await` (bin "async_await") generated 1 warning | ||
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.21s | ||
Running `target/debug/async_await` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// ANCHOR: all | ||
fn main() { | ||
hello("async"); | ||
} | ||
|
||
async fn hello(name: &str) { | ||
let greeting = format!("Hello, {name}!"); | ||
println!("{greeting}"); | ||
} | ||
// ANCHOR_END: all |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[package] | ||
name = "async_await" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$ cargo run | ||
Compiling async_await v0.1.0 (/Users/chris/dev/rust-lang/book/listings/ch17-async-await/listing-17-02) | ||
error[E0728]: `await` is only allowed inside `async` functions and blocks | ||
--> src/main.rs:3:20 | ||
| | ||
2 | fn main() { | ||
| ---- this is not `async` | ||
3 | hello("async").await; | ||
| ^^^^^ only allowed inside `async` functions and blocks | ||
|
||
For more information about this error, try `rustc --explain E0728`. | ||
error: could not compile `async_await` (bin "async_await") due to 1 previous error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// ANCHOR: main | ||
fn main() { | ||
hello("async").await; | ||
} | ||
// ANCHOR_END: main | ||
|
||
async fn hello(name: &str) { | ||
let greeting = format!("Hello, {name}!"); | ||
println!("{greeting}"); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[package] | ||
name = "async_await" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$ cargo run | ||
Compiling async_await v0.1.0 (/Users/chris/dev/rust-lang/book/listings/ch17-async-await/listing-17-03-fix) | ||
error[E0752]: `main` function is not allowed to be `async` | ||
--> src/main.rs:2:1 | ||
| | ||
2 | async fn main() { | ||
| ^^^^^^^^^^^^^^^ `main` function is not allowed to be `async` | ||
|
||
For more information about this error, try `rustc --explain E0752`. | ||
error: could not compile `async_await` (bin "async_await") due to 1 previous error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// ANCHOR: main | ||
async fn main() { | ||
hello("async").await; | ||
} | ||
// ANCHOR_END: main | ||
|
||
async fn hello(name: &str) { | ||
let greeting = format!("Hello, {name}!"); | ||
println!("{greeting}"); | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe consider including a
-> ()
return type on this function so the comparison toimpl Future<Output = ()>
is clearer?