Skip to content

Commit a041578

Browse files
committed
fix readme
1 parent 9311fd7 commit a041578

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)