Skip to content

Commit 96b821b

Browse files
authored
Merge branch 'master' into patch-1
2 parents 7f9dae9 + f57e314 commit 96b821b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/concepts/tasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async fn read_file(path: &str) -> Result<String, io::Error> {
1717

1818
fn main() {
1919
let reader_task = task::spawn(async {
20-
let result = read_file("data.csv");
20+
let result = read_file("data.csv").await;
2121
match result {
2222
Ok(s) => println!("{}", s),
2323
Err(e) => println!("Error reading file: {:?}", e)
@@ -33,7 +33,7 @@ This asks the runtime baked into `async_std` to execute the code that reads a fi
3333

3434
```rust
3535
async {
36-
let result = read_file("data.csv");
36+
let result = read_file("data.csv").await;
3737
match result {
3838
Ok(s) => println!("{}", s),
3939
Err(e) => println!("Error reading file: {:?}", e)

0 commit comments

Comments
 (0)