feedback from review

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This commit is contained in:
Yoshua Wuyts 2019-11-21 21:21:19 +01:00
parent 79962e20a5
commit cffacf7fa3
No known key found for this signature in database
GPG key ID: 24EA8164F96777ED
2 changed files with 8 additions and 2 deletions

View file

@ -74,6 +74,10 @@ syntax.
## Examples
All examples require the [`"attributes"` feature] to be enabled. This feature
is not enabled by default because it significantly impacts compile times. See
[`task::block_on`] for an alternative way to start executing tasks.
```rust
async fn say_hello() {
println!("Hello, world!");
@ -90,6 +94,8 @@ More examples, including networking and file access, can be found in our
[`examples`]: https://github.com/async-rs/async-std/tree/master/examples
[documentation]: https://docs.rs/async-std#examples
[`task::block_on`]: task/fn.block_on.html
[`"attributes"` feature]: https://docs.rs/async-std/#features
## Philosophy

View file

@ -154,8 +154,8 @@
//! ```
//! #[async_std::main]
//! async fn main() {
//! let a = || async move { 1u8 };
//! let b = || async move { 2u8 };
//! let a = async { 1u8 };
//! let b = async { 2u8 };
//! assert_eq!(a.join(b).await, (1u8, 2u8))
//! }
//! ```