Skip to content

Commit c13aca7

Browse files
authored
Match a variable name change in the tour (#198)
2 parents 7e77246 + 54594c0 commit c13aca7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

TSPL.docc/GuidedTour/GuidedTour.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,15 +1845,15 @@ Task {
18451845
Use task groups to structure concurrent code.
18461846

18471847
```swift
1848-
let userIDs = await withTaskGroup(of: Int.self) { taskGroup in
1848+
let userIDs = await withTaskGroup(of: Int.self) { group in
18491849
for server in ["primary", "secondary", "development"] {
1850-
taskGroup.addTask {
1850+
group.addTask {
18511851
return await fetchUserID(from: server)
18521852
}
18531853
}
18541854

18551855
var results: [Int] = []
1856-
for await result in taskGroup {
1856+
for await result in group {
18571857
results.append(result)
18581858
}
18591859
return results

0 commit comments

Comments
 (0)