Skip to content

Commit fa5dc30

Browse files
committed
---
yaml --- r: 63108 b: refs/heads/snap-stage3 c: e34756c h: refs/heads/master v: v3
1 parent 6d35e29 commit fa5dc30

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: aac1298122ae9c7838b72f775f1f6d2a35444cc1
4+
refs/heads/snap-stage3: e34756c9ba3bd07107e42a8bd6e0217f80b48ce9
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/doc/tutorial.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,10 @@ loop {
569569
This code prints out a weird sequence of numbers and stops as soon as
570570
it finds one that can be divided by five.
571571

572-
For more involved iteration, such as enumerating the elements of a
573-
collection, Rust uses [higher-order functions](#closures).
572+
Rust also has a `for` construct. It's different from C's `for` and it works
573+
best when iterating over collections. See the section on [closures](#closures)
574+
to find out how to use `for` and higher-order functions for enumerating
575+
elements of a collection.
574576

575577
# Data structures
576578

@@ -1393,6 +1395,7 @@ assert!(crayons.len() == 3);
13931395
assert!(!crayons.is_empty());
13941396
13951397
// Iterate over a vector, obtaining a pointer to each element
1398+
// (`for` is explained in the next section)
13961399
for crayons.each |crayon| {
13971400
let delicious_crayon_wax = unwrap_crayon(*crayon);
13981401
eat_crayon_wax(delicious_crayon_wax);

0 commit comments

Comments
 (0)