Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cffacf7

Browse files
feedback from review
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
1 parent 79962e2 commit cffacf7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ syntax.
7474

7575
## Examples
7676

77+
All examples require the [`"attributes"` feature] to be enabled. This feature
78+
is not enabled by default because it significantly impacts compile times. See
79+
[`task::block_on`] for an alternative way to start executing tasks.
80+
7781
```rust
7882
async fn say_hello() {
7983
println!("Hello, world!");
@@ -90,6 +94,8 @@ More examples, including networking and file access, can be found in our
9094

9195
[`examples`]: https://github.com/async-rs/async-std/tree/master/examples
9296
[documentation]: https://docs.rs/async-std#examples
97+
[`task::block_on`]: task/fn.block_on.html
98+
[`"attributes"` feature]: https://docs.rs/async-std/#features
9399

94100
## Philosophy
95101

‎src/lib.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@
154154
//! ```
155155
//! #[async_std::main]
156156
//! async fn main() {
157-
//! let a = || async move { 1u8 };
158-
//! let b = || async move { 2u8 };
157+
//! let a = async { 1u8 };
158+
//! let b = async { 2u8 };
159159
//! assert_eq!(a.join(b).await, (1u8, 2u8))
160160
//! }
161161
//! ```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /