Remove some singleton vector appends.

This commit is contained in:
Eric Holk
2012-06-15 21:16:42 -04:00
parent 4d1e415611
commit 51ba3518ec
9 changed files with 16 additions and 16 deletions

View File

@@ -139,7 +139,7 @@ fn make_tests(config: config) -> [test::test_desc] {
let file = file;
#debug("inspecting file %s", file);
if is_test(config, file) {
tests += [make_test(config, file)]
vec::push(tests, make_test(config, file))
}
}
ret tests;

View File

@@ -31,7 +31,7 @@ fn load_props(testfile: str) -> test_props {
let mut pp_exact = option::none;
for iter_header(testfile) {|ln|
alt parse_error_pattern(ln) {
option::some(ep) { error_patterns += [ep]; }
option::some(ep) { vec::push(error_patterns, ep) }
option::none { }
};
@@ -44,11 +44,11 @@ fn load_props(testfile: str) -> test_props {
}
option::iter(parse_aux_build(ln)) {|ab|
aux_builds += [ab];
vec::push(aux_builds, ab);
}
option::iter(parse_exec_env(ln)) {|ee|
exec_env += [ee];
vec::push(exec_env, ee);
}
};
ret {

View File

@@ -19,7 +19,7 @@ fn target_env(lib_path: str, prog: str) -> [(str,str)] {
else { (k,v) }
};
if str::ends_with(prog, "rustc.exe") {
env += [("RUST_THREADS", "1")]
vec::push(env, ("RUST_THREADS", "1"));
}
ret env;
}

View File

@@ -104,7 +104,7 @@ fn run_pretty_test(config: config, props: test_props, testfile: str) {
procres);
}
srcs += [procres.stdout];
vec::push(srcs, procres.stdout);
round += 1;
}