File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ fn main() {
111111
112112 let rng = seeded_rng(seed());
113113 // 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];
115115
116116 // Pick two gestures and decide the result
117117 alt (pick(), pick()) {
@@ -1581,7 +1581,7 @@ access local variables in the enclosing scope.
15811581
15821582~~~~
15831583let 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 });
15851585~~~~
15861586
15871587Stack 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):
6767 p = p .replace ("\\ " , "\\ \\ " )
6868 d .write (" out.write_str(\" run-pass [stage2]: %s\\ n\" );\n " % p )
6969 if t in take_args :
70- d .write (" t_%d::main([\" arg0\" ]);\n " % i )
70+ d .write (" t_%d::main(~ [\" arg0\" ]);\n " % i )
7171 else :
7272 d .write (" t_%d::main();\n " % i )
7373 i += 1
You can’t perform that action at this time.
0 commit comments