File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ fn main() {
111
111
112
112
let rng = seeded_rng(seed());
113
113
// A small inline function for picking an RPS gesture
114
- let pick = || [rock, paper, scissors][rng.gen_uint() % 3];
114
+ let pick = || (~ [rock, paper, scissors]) [rng.gen_uint() % 3];
115
115
116
116
// Pick two gestures and decide the result
117
117
alt (pick(), pick()) {
@@ -1581,7 +1581,7 @@ access local variables in the enclosing scope.
1581
1581
1582
1582
~~~~
1583
1583
let mut max = 0;
1584
- [1, 2, 3].map(|x| if x > max { max = x });
1584
+ (~ [1, 2, 3]) .map(|x| if x > max { max = x });
1585
1585
~~~~
1586
1586
1587
1587
Stack closures are very efficient because their environment is
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ def scrub(b):
67
67
p = p .replace ("\\ " , "\\ \\ " )
68
68
d .write (" out.write_str(\" run-pass [stage2]: %s\\ n\" );\n " % p )
69
69
if t in take_args :
70
- d .write (" t_%d::main([\" arg0\" ]);\n " % i )
70
+ d .write (" t_%d::main(~ [\" arg0\" ]);\n " % i )
71
71
else :
72
72
d .write (" t_%d::main();\n " % i )
73
73
i += 1
You can’t perform that action at this time.
0 commit comments