Skip to content

Commit 871013b

Browse files
author
Eric Holk
committed
Syntax updates.
1 parent d63f834 commit 871013b

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

src/test/bench/task-perf-word-count.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ mod map_reduce {
7575
tag reduce_proto { emit_val(int); done; ref; release; }
7676

7777
fn start_mappers(ctrl: _chan[ctrl_proto], inputs: &[str]) -> [task_id] {
78-
let tasks = [];
78+
let tasks = ~[];
7979
for i: str in inputs {
8080
tasks += ~[task::_spawn(bind map_task(ctrl, i))];
8181
}
@@ -178,7 +178,8 @@ mod map_reduce {
178178
none. {
179179
// log_err "creating new reducer for " + k;
180180
let p = mk_port();
181-
tasks += [task::_spawn(bind reduce_task(k, p.mk_chan()))];
181+
tasks +=
182+
~[task::_spawn(bind reduce_task(k, p.mk_chan()))];
182183
c = p.recv();
183184
reducers.insert(k, c);
184185
}

src/test/compiletest/procsrv.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,17 @@ fn append_lib_path(path: &str) { export_lib_path(util::make_new_path(path)); }
185185
fn export_lib_path(path: &str) { setenv(util::lib_path_env_var(), path); }
186186

187187
fn clone_ivecstr(v: &[str]) -> [[u8]] {
188-
let r = [];
188+
let r = ~[];
189189
for t: str in ivec::slice(v, 0u, ivec::len(v)) {
190-
r += [str::bytes(t)];
190+
r += ~[str::bytes(t)];
191191
}
192192
ret r;
193193
}
194194

195195
fn clone_ivecu8str(v: &[[u8]]) -> [str] {
196-
let r = [];
196+
let r = ~[];
197197
for t in ivec::slice(v, 0u, ivec::len(v)) {
198-
r += [str::unsafe_from_bytes(t)];
198+
r += ~[str::unsafe_from_bytes(t)];
199199
}
200200
ret r;
201201
}

src/test/run-pass/issue-687.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import std::comm::send;
1010
tag msg { closed; received([u8]); }
1111

1212
fn producer(c: _chan[[u8]]) {
13-
send(c, [1u8, 2u8, 3u8, 4u8]);
14-
let empty: [u8] = [];
13+
send(c, ~[1u8, 2u8, 3u8, 4u8]);
14+
let empty: [u8] = ~[];
1515
send(c, empty);
1616
}
1717

src/test/run-pass/ivec-tag.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import std::comm::mk_port;
88
import std::comm::send;
99

1010
fn producer(c: _chan[[u8]]) {
11-
send(c, [1u8, 2u8, 3u8, 4u8, 5u8, 6u8, 7u8,
12-
8u8, 9u8, 10u8, 11u8, 12u8, 13u8 ]);
11+
send(c, ~[1u8, 2u8, 3u8, 4u8, 5u8, 6u8, 7u8,
12+
8u8, 9u8, 10u8, 11u8, 12u8, 13u8 ]);
1313
}
1414

1515
fn main() {

0 commit comments

Comments
 (0)