Skip to content

Commit

Permalink
fix(#110): swap rows and cols labels
Browse files Browse the repository at this point in the history
  • Loading branch information
amanjeev committed Oct 23, 2023
1 parent a2e7d32 commit babe939
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions training-slides/src/control-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ If you have nested loops, you can label them to indicate which one you want to b

```rust []
fn main() {
'rows: for x in 0..5 {
'cols: for y in 0..5 {
'cols: for x in 0..5 {
'rows: for y in 0..5 {
println!("x = {}, y = {}", x, y);
if x + y >= 6 {
break 'rows;
break 'cols;
}
}
}
Expand Down

0 comments on commit babe939

Please sign in to comment.