Visibly import in tasks example

Fixes #97
pull/112/head
Florian Gilcher 5 years ago
parent b768a7bab7
commit 366546b9ce
No known key found for this signature in database
GPG Key ID: E7B51D33F8EBF61B

@ -6,9 +6,8 @@ In `async-std`, the [`tasks`][tasks] module is responsible for this. The simples
```rust,edition2018 ```rust,edition2018
# extern crate async_std; # extern crate async_std;
# use async_std::{fs::File, io::Read, task}; use async_std::{io, task, fs::File, io::Read};
# use std::io;
#
async fn read_file(path: &str) -> Result<String, io::Error> { async fn read_file(path: &str) -> Result<String, io::Error> {
let mut file = File::open(path).await?; let mut file = File::open(path).await?;
let mut contents = String::new(); let mut contents = String::new();

Loading…
Cancel
Save