mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 19:54:34 -06:00
rebuild pages at 8653fed
This commit is contained in:
@@ -358,7 +358,7 @@ bugs resulting from going beyond the end of the array or not going far enough
|
||||
and missing some items.</p>
|
||||
<p>For example, in the previous code that uses the <code>while</code> loop, if we removed an
|
||||
item from the <code>a</code> array but forgot to update the condition to be <code>while index < 4</code>, our code would panic. Using the <code>for</code> loop means we would not need to
|
||||
remember to change any other code if we changed the the number of values in the
|
||||
remember to change any other code if we changed the number of values in the
|
||||
array.</p>
|
||||
<p>If you're wondering about the <code>.iter()</code> code in this example, keep reading! We
|
||||
will cover method syntax generally in Chapter XX and iterators specifically in
|
||||
|
||||
+1
-1
@@ -2138,7 +2138,7 @@ bugs resulting from going beyond the end of the array or not going far enough
|
||||
and missing some items.</p>
|
||||
<p>For example, in the previous code that uses the <code>while</code> loop, if we removed an
|
||||
item from the <code>a</code> array but forgot to update the condition to be <code>while index < 4</code>, our code would panic. Using the <code>for</code> loop means we would not need to
|
||||
remember to change any other code if we changed the the number of values in the
|
||||
remember to change any other code if we changed the number of values in the
|
||||
array.</p>
|
||||
<p>If you're wondering about the <code>.iter()</code> code in this example, keep reading! We
|
||||
will cover method syntax generally in Chapter XX and iterators specifically in
|
||||
|
||||
Reference in New Issue
Block a user