2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-16 10:49:55 +00:00

Book: Fix typo in tasks example

This commit is contained in:
Pascal Hertleif 2019-08-16 23:20:15 +02:00 committed by GitHub
parent 2921570f3f
commit df8cea8ab6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ use async_std::fs::File;
use async_std::task;
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();
file.read_to_string(&mut contents).await?;
contents