rebuild pages at da18e98

This commit is contained in:
Steve Klabnik
2017-01-09 02:10:44 +00:00
parent 502c876cf9
commit bee40ea43c
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -364,9 +364,9 @@ the value is: 50
will reach a value of <code>5</code> at some point, the loop stops executing before trying
to fetch a sixth value from the array.</p>
<p>But this approach is error prone; we could cause the program to panic if the
index length is incorrect. It’s also slow, because the compiler needs to
perform the conditional check on every element on every iteration through the
loop.</p>
index length is incorrect. It’s also slow, because the compiler adds
runtime code to perform the conditional check on every element on every
iteration through the loop.</p>
<p>As a more efficient alternative, you can use a <code>for</code> loop and execute some code
for each item in a collection. A <code>for</code> loop looks like this:</p>
<figure>
+3 -3
View File
@@ -2352,9 +2352,9 @@ the value is: 50
will reach a value of <code>5</code> at some point, the loop stops executing before trying
to fetch a sixth value from the array.</p>
<p>But this approach is error prone; we could cause the program to panic if the
index length is incorrect. It’s also slow, because the compiler needs to
perform the conditional check on every element on every iteration through the
loop.</p>
index length is incorrect. It’s also slow, because the compiler adds
runtime code to perform the conditional check on every element on every
iteration through the loop.</p>
<p>As a more efficient alternative, you can use a <code>for</code> loop and execute some code
for each item in a collection. A <code>for</code> loop looks like this:</p>
<figure>