From a04157850bfa7fca3384c94543760c5a8c70a4e5 Mon Sep 17 00:00:00 2001 From: k-nasa Date: Sun, 8 Dec 2019 15:15:29 +0900 Subject: [PATCH] fix readme --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 769b4296..46616390 100644 --- a/README.md +++ b/README.md @@ -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()) } ```