From 86aa5fdffdd14ef9b0d26862dfeadbe0a5651ccc Mon Sep 17 00:00:00 2001 From: Atabic Umer Date: Thu, 26 Oct 2023 17:13:38 +0500 Subject: [PATCH 1/2] Update ch03-05-control-flow.md, replaced `for` with `while` --- src/ch03-05-control-flow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch03-05-control-flow.md b/src/ch03-05-control-flow.md index 60d6b95a96..bb7fc57e13 100644 --- a/src/ch03-05-control-flow.md +++ b/src/ch03-05-control-flow.md @@ -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 From f6e6e9eaff5d60b50eaca825a3cd340fe0d83925 Mon Sep 17 00:00:00 2001 From: Atabic Umer Date: Thu, 26 Oct 2023 17:39:25 +0500 Subject: [PATCH 2/2] Update ch12-04-testing-the-librarys-functionality.md --- src/ch12-04-testing-the-librarys-functionality.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch12-04-testing-the-librarys-functionality.md b/src/ch12-04-testing-the-librarys-functionality.md index 129f835aa1..d8bc1c701f 100644 --- a/src/ch12-04-testing-the-librarys-functionality.md +++ b/src/ch12-04-testing-the-librarys-functionality.md @@ -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