Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ch03-05-control-flow.md, replaced for with while #3757

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ch03-05-control-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ This construct eliminates a lot of nesting that would be necessary if you used
`loop`, `if`, `else`, and `break`, and it’s clearer. While a condition
evaluates to `true`, the code runs; otherwise, it exits the loop.

#### Looping Through a Collection with `for`
#### Looping Through a Collection with `while`

You can choose to use the `while` construct to loop over the elements of a
collection, such as an array. For example, the loop in Listing 3-4 prints each
Expand Down
2 changes: 1 addition & 1 deletion src/ch12-04-testing-the-librarys-functionality.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,5 +241,5 @@ useful when you’re writing command line programs.
ch10-03-lifetime-syntax.html#validating-references-with-lifetimes
[ch11-anatomy]: ch11-01-writing-tests.html#the-anatomy-of-a-test-function
[ch10-lifetimes]: ch10-03-lifetime-syntax.html
[ch3-iter]: ch03-05-control-flow.html#looping-through-a-collection-with-for
[ch3-iter]: ch03-05-control-flow.html#looping-through-a-collection-with-while
[ch13-iterators]: ch13-02-iterators.html