Skip to content

Commit 1103c17

Browse files
authored
Merge pull request #613 from k-nasa/fix_readme
Readme example simply compile
2 parents a0f3b3b + a041578 commit 1103c17

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

README.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,15 @@ 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-
8177
```rust
78+
use async_std::task;
79+
8280
async fn say_hello() {
8381
println!("Hello, world!");
8482
}
8583

86-
#[async_std::main]
87-
async fn main() {
88-
say_hello().await;
84+
fn main() {
85+
task::block_on(say_hello())
8986
}
9087
```
9188

0 commit comments

Comments
 (0)