@@ -93,7 +93,7 @@ pub fn parse_config(args: Vec<~str> ) -> config {
9393 assert ! ( !args. is_empty( ) ) ;
9494 let argv0 = ( * args. get ( 0 ) ) . clone ( ) ;
9595 let args_ = args. tail ( ) ;
96- if * args. get ( 1 ) == ~ "-h" || * args. get ( 1 ) == ~ "--help" {
96+ if * args. get ( 1 ) == "-h" . to_owned ( ) || * args. get ( 1 ) == "--help" . to_owned ( ) {
9797 let message = format ! ( "Usage: {} [OPTIONS] [TESTNAME...]" , argv0) ;
9898 println ! ( "{}" , getopts:: usage( message, groups. as_slice( ) ) ) ;
9999 println ! ( "" ) ;
@@ -181,7 +181,7 @@ pub fn log_config(config: &config) {
181181 logv ( c, format ! ( "adb_test_dir: {}" , config. adb_test_dir) ) ;
182182 logv ( c, format ! ( "adb_device_status: {}" , config. adb_device_status) ) ;
183183 match config. test_shard {
184- None => logv ( c, ~ "test_shard : ( all) ") ,
184+ None => logv ( c, "test_shard: (all)" . to_owned ( ) ) ,
185185 Some ( ( a, b) ) => logv ( c, format ! ( "test_shard: {}.{}" , a, b) )
186186 }
187187 logv ( c, format ! ( "verbose: {}" , config. verbose) ) ;
@@ -199,7 +199,7 @@ pub fn opt_str<'a>(maybestr: &'a Option<~str>) -> &'a str {
199199}
200200
201201pub fn opt_str2 ( maybestr : Option < ~str > ) -> ~str {
202- match maybestr { None => ~ "( none) ", Some ( s) => { s } }
202+ match maybestr { None => "(none)" . to_owned ( ) , Some ( s) => { s } }
203203}
204204
205205pub fn str_mode ( s : ~str ) -> mode {
@@ -216,17 +216,17 @@ pub fn str_mode(s: ~str) -> mode {
216216
217217pub fn mode_str ( mode : mode ) -> ~str {
218218 match mode {
219- mode_compile_fail => ~ "compile-fail",
220- mode_run_fail => ~ "run-fail",
221- mode_run_pass => ~ "run-pass",
222- mode_pretty => ~ "pretty",
223- mode_debug_info => ~ "debug-info",
224- mode_codegen => ~ "codegen",
219+ mode_compile_fail => "compile-fail" . to_owned ( ) ,
220+ mode_run_fail => "run-fail" . to_owned ( ) ,
221+ mode_run_pass => "run-pass" . to_owned ( ) ,
222+ mode_pretty => "pretty" . to_owned ( ) ,
223+ mode_debug_info => "debug-info" . to_owned ( ) ,
224+ mode_codegen => "codegen" . to_owned ( ) ,
225225 }
226226}
227227
228228pub fn run_tests ( config : & config ) {
229- if config. target == ~ "arm-linux-androideabi" {
229+ if config. target == "arm-linux-androideabi" . to_owned ( ) {
230230 match config. mode {
231231 mode_debug_info => {
232232 println ! ( "arm-linux-androideabi debug-info \
@@ -296,10 +296,10 @@ pub fn is_test(config: &config, testfile: &Path) -> bool {
296296 // Pretty-printer does not work with .rc files yet
297297 let valid_extensions =
298298 match config. mode {
299- mode_pretty => vec ! ( ~ ". rs"),
300- _ => vec!(~ " . rc", ~ " . rs")
299+ mode_pretty => vec ! ( ".rs" . to_owned ( ) ) ,
300+ _ => vec ! ( ".rc" . to_owned ( ) , ".rs" . to_owned ( ) )
301301 } ;
302- let invalid_prefixes = vec!(~ " . ", ~ " #", ~ " ~") ;
302+ let invalid_prefixes = vec ! ( "." . to_owned ( ) , "#" . to_owned ( ) , "~" . to_owned ( ) ) ;
303303 let name = testfile. filename_str ( ) . unwrap ( ) ;
304304
305305 let mut valid = false ;
0 commit comments