diff --git a/docs/src/concepts/tasks.md b/docs/src/concepts/tasks.md index 5c62811..0711c12 100644 --- a/docs/src/concepts/tasks.md +++ b/docs/src/concepts/tasks.md @@ -6,9 +6,8 @@ In `async-std`, the [`tasks`][tasks] module is responsible for this. The simples ```rust,edition2018 # extern crate async_std; -# use async_std::{fs::File, io::Read, task}; -# use std::io; -# +use async_std::{io, task, fs::File, io::Read}; + async fn read_file(path: &str) -> Result { let mut file = File::open(path).await?; let mut contents = String::new();