diff options
| author | Richo Healey <richo@psych0tik.net> | 2014-04-15 18:17:48 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-04-18 17:25:34 -0700 |
| commit | 919889a1d688a6bbe2edac8705f048f06b1b455c (patch) | |
| tree | 322a69fa39bdaf37bbfffc84020acbd4c87871d0 /src/compiletest/compiletest.rs | |
| parent | b75683cadf6c4c55360202cd6a0106be80532451 (diff) | |
| download | rust-919889a1d688a6bbe2edac8705f048f06b1b455c.tar.gz rust-919889a1d688a6bbe2edac8705f048f06b1b455c.zip | |
Replace all ~"" with "".to_owned()
Diffstat (limited to 'src/compiletest/compiletest.rs')
| -rw-r--r-- | src/compiletest/compiletest.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index d2499ea33bd..cae6c2b656d 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -93,7 +93,7 @@ pub fn parse_config(args: Vec<~str> ) -> config { assert!(!args.is_empty()); let argv0 = (*args.get(0)).clone(); let args_ = args.tail(); - if *args.get(1) == ~"-h" || *args.get(1) == ~"--help" { + if *args.get(1) == "-h".to_owned() || *args.get(1) == "--help".to_owned() { let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0); println!("{}", getopts::usage(message, groups.as_slice())); println!(""); @@ -181,7 +181,7 @@ pub fn log_config(config: &config) { logv(c, format!("adb_test_dir: {}", config.adb_test_dir)); logv(c, format!("adb_device_status: {}", config.adb_device_status)); match config.test_shard { - None => logv(c, ~"test_shard: (all)"), + None => logv(c, "test_shard: (all)".to_owned()), Some((a,b)) => logv(c, format!("test_shard: {}.{}", a, b)) } logv(c, format!("verbose: {}", config.verbose)); @@ -199,7 +199,7 @@ pub fn opt_str<'a>(maybestr: &'a Option<~str>) -> &'a str { } pub fn opt_str2(maybestr: Option<~str>) -> ~str { - match maybestr { None => ~"(none)", Some(s) => { s } } + match maybestr { None => "(none)".to_owned(), Some(s) => { s } } } pub fn str_mode(s: ~str) -> mode { @@ -216,17 +216,17 @@ pub fn str_mode(s: ~str) -> mode { pub fn mode_str(mode: mode) -> ~str { match mode { - mode_compile_fail => ~"compile-fail", - mode_run_fail => ~"run-fail", - mode_run_pass => ~"run-pass", - mode_pretty => ~"pretty", - mode_debug_info => ~"debug-info", - mode_codegen => ~"codegen", + mode_compile_fail => "compile-fail".to_owned(), + mode_run_fail => "run-fail".to_owned(), + mode_run_pass => "run-pass".to_owned(), + mode_pretty => "pretty".to_owned(), + mode_debug_info => "debug-info".to_owned(), + mode_codegen => "codegen".to_owned(), } } pub fn run_tests(config: &config) { - if config.target == ~"arm-linux-androideabi" { + if config.target == "arm-linux-androideabi".to_owned() { match config.mode{ mode_debug_info => { println!("arm-linux-androideabi debug-info \ @@ -296,10 +296,10 @@ pub fn is_test(config: &config, testfile: &Path) -> bool { // Pretty-printer does not work with .rc files yet let valid_extensions = match config.mode { - mode_pretty => vec!(~".rs"), - _ => vec!(~".rc", ~".rs") + mode_pretty => vec!(".rs".to_owned()), + _ => vec!(".rc".to_owned(), ".rs".to_owned()) }; - let invalid_prefixes = vec!(~".", ~"#", ~"~"); + let invalid_prefixes = vec!(".".to_owned(), "#".to_owned(), "~".to_owned()); let name = testfile.filename_str().unwrap(); let mut valid = false; |
