Update 2394-async_await.md

'block_on' function might have been moved from futures module to futures::executor module. I wonder if the dependency used there should be state explicitly?
This commit is contained in:
Senrelio 2020-05-23 21:57:31 +08:00 committed by GitHub
parent f4867a78bb
commit 6041dd9ff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ async fn print_async() {
fn main() {
let future = print_async();
println!("Hello from main");
futures::block_on(future);
futures::executor::block_on(future);
}
```