Skip to content

Commit 0f6da9b

Browse files
committed
fix ch07 corofy invocation: rename coro → coroutine
1 parent e0ffd30 commit 0f6da9b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ch07/b-async-await/original_main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn get_path(i: usize) -> String {
1010
format!("/{}/HelloWorld{i}", i * 1000)
1111
}
1212

13-
coro fn async_main() {
13+
coroutine fn async_main() {
1414
println!("Program starting");
1515

1616
let txt = Http::get(&get_path(0)).wait;
@@ -22,6 +22,7 @@ coro fn async_main() {
2222
let txt = Http::get(&get_path(3)).wait;
2323
println!("{txt}");
2424
let txt = Http::get(&get_path(4)).wait;
25+
println!("{txt}");
2526
}
2627

2728

ch07/c-async-await/original_main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ coro fn request(i: usize) {
1212
println!("{txt}");
1313
}
1414

15-
coro fn async_main() {
15+
coroutine fn async_main() {
1616
println!("Program starting");
1717
let mut futures = vec![];
1818

@@ -36,4 +36,4 @@ fn main() {
3636
}
3737

3838
println!("\nELAPSED TIME: {}", start.elapsed().as_secs_f32());
39-
}
39+
}

0 commit comments

Comments
 (0)