Merge pull request #613 from k-nasa/fix_readme

Readme example simply compile
split-by-pattern
Yoshua Wuyts 5 years ago committed by GitHub
commit 1103c17e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -74,18 +74,15 @@ 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
use async_std::task;
async fn say_hello() {
println!("Hello, world!");
}
#[async_std::main]
async fn main() {
say_hello().await;
fn main() {
task::block_on(say_hello())
}
```

Loading…
Cancel
Save