mirror of
https://github.com/async-rs/async-std.git
synced 2025-04-02 14:36:40 +00:00
Book: Fix typo in tasks example
This commit is contained in:
parent
2921570f3f
commit
df8cea8ab6
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ use async_std::fs::File;
|
||||||
use async_std::task;
|
use async_std::task;
|
||||||
|
|
||||||
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();
|
||||||
file.read_to_string(&mut contents).await?;
|
file.read_to_string(&mut contents).await?;
|
||||||
contents
|
contents
|
||||||
|
|
Loading…
Reference in a new issue