From 54cd5e1814682e95360e591440274550ee312da4 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sat, 14 Jul 2012 18:28:20 -0700 Subject: [PATCH] ~strify win32-specific fns --- src/compiletest/procsrv.rs | 12 ++++++------ src/compiletest/runtest.rs | 4 ++-- src/compiletest/util.rs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/compiletest/procsrv.rs b/src/compiletest/procsrv.rs index d69d02c32eb59..67387f2b6a4e7 100644 --- a/src/compiletest/procsrv.rs +++ b/src/compiletest/procsrv.rs @@ -5,21 +5,21 @@ import libc::{c_int, pid_t}; export run; #[cfg(target_os = "win32")] -fn target_env(lib_path: str, prog: str) -> ~[(str,str)] { +fn target_env(lib_path: ~str, prog: ~str) -> ~[(~str,~str)] { let mut env = os::env(); // Make sure we include the aux directory in the path - assert prog.ends_with(".exe"); - let aux_path = prog.slice(0u, prog.len() - 4u) + ".libaux"; + assert prog.ends_with(~".exe"); + let aux_path = prog.slice(0u, prog.len() - 4u) + ~".libaux"; env = do vec::map(env) |pair| { let (k,v) = pair; - if k == "PATH" { ("PATH", v + ";" + lib_path + ";" + aux_path) } + if k == ~"PATH" { (~"PATH", v + ~";" + lib_path + ~";" + aux_path) } else { (k,v) } }; - if str::ends_with(prog, "rustc.exe") { - vec::push(env, ("RUST_THREADS", "1")); + if str::ends_with(prog, ~"rustc.exe") { + vec::push(env, (~"RUST_THREADS", ~"1")); } ret env; } diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 6e43c1756a7a2..d589003110940 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -434,9 +434,9 @@ fn make_cmdline(_libpath: ~str, prog: ~str, args: ~[~str]) -> ~str { } #[cfg(target_os = "win32")] -fn make_cmdline(libpath: str, prog: str, args: ~[str]) -> str { +fn make_cmdline(libpath: ~str, prog: ~str, args: ~[~str]) -> ~str { #fmt["%s %s %s", lib_path_cmd_prefix(libpath), prog, - str::connect(args, " ")] + str::connect(args, ~" ")] } // Build the LD_LIBRARY_PATH variable as it would be seen on the command line diff --git a/src/compiletest/util.rs b/src/compiletest/util.rs index 34d5b685a1b37..bd99b340138ea 100644 --- a/src/compiletest/util.rs +++ b/src/compiletest/util.rs @@ -31,7 +31,7 @@ fn lib_path_env_var() -> ~str { ~"PATH" } fn path_div() -> ~str { ~":" } #[cfg(target_os = "win32")] -fn path_div() -> str { ~";" } +fn path_div() -> ~str { ~";" } fn logv(config: config, s: ~str) { log(debug, s);