We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2dfdc1c commit d7fa0ccCopy full SHA for d7fa0cc
README.md
@@ -75,19 +75,21 @@ syntax.
75
## Examples
76
77
```rust
78
-use async_std::task;
+async fn say_hello() {
79
+ println!("Hello, world!");
80
+}
81
-fn main() {
- task::block_on(async {
82
- println!("Hello, world!");
83
- })
+#[async_std::main]
+async fn main() {
84
+ say_hello().await;
85
}
86
```
87
88
More examples, including networking and file access, can be found in our
-[`examples`] directory.
89
+[`examples`] directory and on our [docs].
90
91
[`examples`]: https://github.com/async-rs/async-std/tree/master/examples
92
+[docs]: https://docs.rs/async-std#examples
93
94
## Philosophy
95
0 commit comments