async-std/examples/hello-world.rs

12 lines
155 B
Rust
Raw Permalink Normal View History

2019-08-08 12:44:48 +00:00
//! Spawns a task that says hello.
use async_std::task;
async fn say_hi() {
println!("Hello, world!");
}
fn main() {
task::block_on(say_hi())
}