We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e5ff94 commit 77171b5Copy full SHA for 77171b5
docs/src/concepts/tasks.md
@@ -15,15 +15,15 @@ async fn read_file(path: &str) -> Result<String, io::Error> {
15
}
16
17
fn main() {
18
- let task = task::spawn(async {
+ let reader_task = task::spawn(async {
19
let result = read_file("data.csv");
20
match result {
21
Ok(s) => println!("{}", s),
22
Err(e) => println!("Error reading file: {:?}", e)
23
24
});
25
println!("Started task!");
26
- task::block_on(task);
+ task::block_on(reader_task);
27
println!("Stopped task!");
28
29
```
0 commit comments