Skip to content

Commit eb66c9c

Browse files
Merge pull request #1884 from nicholasshirley/master
consistenly use increment and decrement
2 parents feeaff2 + 5179c2a commit eb66c9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ch03-05-control-flow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ fn main() {
365365
while number != 0 {
366366
println!("{}!", number);
367367

368-
number = number - 1;
368+
number -= 1;
369369
}
370370

371371
println!("LIFTOFF!!!");
@@ -394,7 +394,7 @@ fn main() {
394394
while index < 5 {
395395
println!("the value is: {}", a[index]);
396396

397-
index = index + 1;
397+
index += 1;
398398
}
399399
}
400400
```

0 commit comments

Comments
 (0)