forked from mirror/async-std
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
155 B
Rust
12 lines
155 B
Rust
5 years ago
|
//! Spawns a task that says hello.
|
||
|
|
||
|
use async_std::task;
|
||
|
|
||
|
async fn say_hi() {
|
||
|
println!("Hello, world!");
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
task::block_on(say_hi())
|
||
|
}
|