Skip to content

Commit c8f3ab9

Browse files
bstriecatamorphism
authored andcommitted
---
yaml --- r: 37253 b: refs/heads/try c: f7ce3dc h: refs/heads/master i: 37251: 4845369 v: v3
1 parent 0194a2e commit c8f3ab9

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: 5e1d0bab8075df5ce06543537296d7294440bd45
5+
refs/heads/try: f7ce3dc55f1bcc8a741951a4b9f090bad61769ae
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/doc/tutorial.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ and [`core::str`]. Here are some examples.
15041504
# fn store_crayon_in_nasal_cavity(i: uint, c: Crayon) { }
15051505
# fn crayon_to_str(c: Crayon) -> &str { "" }
15061506
1507-
let crayons = &[Almond, AntiqueBrass, Apricot];
1507+
let crayons = [Almond, AntiqueBrass, Apricot];
15081508
15091509
// Check the length of the vector
15101510
assert crayons.len() == 3;
@@ -1679,7 +1679,7 @@ structure.
16791679
~~~~
16801680
# fn each(v: &[int], op: fn(v: &int)) { }
16811681
# fn do_some_work(i: &int) { }
1682-
each(&[1, 2, 3], |n| {
1682+
each([1, 2, 3], |n| {
16831683
do_some_work(n);
16841684
});
16851685
~~~~
@@ -1690,7 +1690,7 @@ call that can be written more like a built-in control structure:
16901690
~~~~
16911691
# fn each(v: &[int], op: fn(v: &int)) { }
16921692
# fn do_some_work(i: &int) { }
1693-
do each(&[1, 2, 3]) |n| {
1693+
do each([1, 2, 3]) |n| {
16941694
do_some_work(n);
16951695
}
16961696
~~~~
@@ -1751,7 +1751,7 @@ And using this function to iterate over a vector:
17511751
~~~~
17521752
# use each = vec::each;
17531753
# use println = io::println;
1754-
each(&[2, 4, 8, 5, 16], |n| {
1754+
each([2, 4, 8, 5, 16], |n| {
17551755
if *n % 2 != 0 {
17561756
println("found odd number!");
17571757
false
@@ -1768,7 +1768,7 @@ to the next iteration, write `loop`.
17681768
~~~~
17691769
# use each = vec::each;
17701770
# use println = io::println;
1771-
for each(&[2, 4, 8, 5, 16]) |n| {
1771+
for each([2, 4, 8, 5, 16]) |n| {
17721772
if *n % 2 != 0 {
17731773
println("found odd number!");
17741774
break;
@@ -2106,7 +2106,7 @@ impl @Rectangle: Drawable { fn draw() { ... } }
21062106
21072107
let c: @Circle = @new_circle();
21082108
let r: @Rectangle = @new_rectangle();
2109-
draw_all(&[c as @Drawable, r as @Drawable]);
2109+
draw_all([c as @Drawable, r as @Drawable]);
21102110
~~~~
21112111

21122112
We omit the code for `new_circle` and `new_rectangle`; imagine that

0 commit comments

Comments
 (0)