@@ -50,7 +50,7 @@ fn start(argc: int, argv: **u8) -> int {
50
50
pub fn main ( ) {
51
51
let args = os:: args ( ) ;
52
52
let config = parse_config ( args. move_iter ( )
53
- . map ( |x| x. to_strbuf ( ) )
53
+ . map ( |x| x. to_string ( ) )
54
54
. collect ( ) ) ;
55
55
log_config ( & config) ;
56
56
run_tests ( & config) ;
@@ -134,15 +134,15 @@ pub fn parse_config(args: Vec<String> ) -> Config {
134
134
Config {
135
135
compile_lib_path : matches. opt_str ( "compile-lib-path" )
136
136
. unwrap ( )
137
- . to_strbuf ( ) ,
138
- run_lib_path : matches. opt_str ( "run-lib-path" ) . unwrap ( ) . to_strbuf ( ) ,
137
+ . to_string ( ) ,
138
+ run_lib_path : matches. opt_str ( "run-lib-path" ) . unwrap ( ) . to_string ( ) ,
139
139
rustc_path : opt_path ( matches, "rustc-path" ) ,
140
140
clang_path : matches. opt_str ( "clang-path" ) . map ( |s| Path :: new ( s) ) ,
141
141
llvm_bin_path : matches. opt_str ( "llvm-bin-path" ) . map ( |s| Path :: new ( s) ) ,
142
142
src_base : opt_path ( matches, "src-base" ) ,
143
143
build_base : opt_path ( matches, "build-base" ) ,
144
144
aux_base : opt_path ( matches, "aux-base" ) ,
145
- stage_id : matches. opt_str ( "stage-id" ) . unwrap ( ) . to_strbuf ( ) ,
145
+ stage_id : matches. opt_str ( "stage-id" ) . unwrap ( ) . to_string ( ) ,
146
146
mode : FromStr :: from_str ( matches. opt_str ( "mode" )
147
147
. unwrap ( )
148
148
. as_slice ( ) ) . expect ( "invalid mode" ) ,
@@ -156,32 +156,32 @@ pub fn parse_config(args: Vec<String> ) -> Config {
156
156
ratchet_noise_percent :
157
157
matches. opt_str ( "ratchet-noise-percent" )
158
158
. and_then ( |s| from_str :: < f64 > ( s. as_slice ( ) ) ) ,
159
- runtool : matches. opt_str ( "runtool" ) . map ( |x| x. to_strbuf ( ) ) ,
159
+ runtool : matches. opt_str ( "runtool" ) . map ( |x| x. to_string ( ) ) ,
160
160
host_rustcflags : matches. opt_str ( "host-rustcflags" )
161
- . map ( |x| x. to_strbuf ( ) ) ,
161
+ . map ( |x| x. to_string ( ) ) ,
162
162
target_rustcflags : matches. opt_str ( "target-rustcflags" )
163
- . map ( |x| x. to_strbuf ( ) ) ,
163
+ . map ( |x| x. to_string ( ) ) ,
164
164
jit : matches. opt_present ( "jit" ) ,
165
- target : opt_str2 ( matches. opt_str ( "target" ) . map ( |x| x. to_strbuf ( ) ) ) ,
166
- host : opt_str2 ( matches. opt_str ( "host" ) . map ( |x| x. to_strbuf ( ) ) ) ,
165
+ target : opt_str2 ( matches. opt_str ( "target" ) . map ( |x| x. to_string ( ) ) ) ,
166
+ host : opt_str2 ( matches. opt_str ( "host" ) . map ( |x| x. to_string ( ) ) ) ,
167
167
android_cross_path : opt_path ( matches, "android-cross-path" ) ,
168
168
adb_path : opt_str2 ( matches. opt_str ( "adb-path" )
169
- . map ( |x| x. to_strbuf ( ) ) ) ,
169
+ . map ( |x| x. to_string ( ) ) ) ,
170
170
adb_test_dir : opt_str2 ( matches. opt_str ( "adb-test-dir" )
171
- . map ( |x| x. to_strbuf ( ) ) ) ,
171
+ . map ( |x| x. to_string ( ) ) ) ,
172
172
adb_device_status :
173
173
"arm-linux-androideabi" ==
174
174
opt_str2 ( matches. opt_str ( "target" )
175
- . map ( |x| x. to_strbuf ( ) ) ) . as_slice ( ) &&
175
+ . map ( |x| x. to_string ( ) ) ) . as_slice ( ) &&
176
176
"(none)" !=
177
177
opt_str2 ( matches. opt_str ( "adb-test-dir" )
178
- . map ( |x| x. to_strbuf ( ) ) ) . as_slice ( ) &&
178
+ . map ( |x| x. to_string ( ) ) ) . as_slice ( ) &&
179
179
!opt_str2 ( matches. opt_str ( "adb-test-dir" )
180
- . map ( |x| x. to_strbuf ( ) ) ) . is_empty ( ) ,
180
+ . map ( |x| x. to_string ( ) ) ) . is_empty ( ) ,
181
181
lldb_python_dir : matches. opt_str ( "lldb-python-dir" )
182
- . map ( |x| x. to_strbuf ( ) ) ,
182
+ . map ( |x| x. to_string ( ) ) ,
183
183
test_shard : test:: opt_shard ( matches. opt_str ( "test-shard" )
184
- . map ( |x| x. to_strbuf ( ) ) ) ,
184
+ . map ( |x| x. to_string ( ) ) ) ,
185
185
verbose : matches. opt_present ( "verbose" )
186
186
}
187
187
}
@@ -201,7 +201,7 @@ pub fn log_config(config: &Config) {
201
201
opt_str( & config. filter
202
202
. as_ref( )
203
203
. map( |re| {
204
- re. to_str( ) . into_strbuf ( )
204
+ re. to_str( ) . into_string ( )
205
205
} ) ) ) ) ;
206
206
logv ( c, format_strbuf ! ( "runtool: {}" , opt_str( & config. runtool) ) ) ;
207
207
logv ( c, format_strbuf ! ( "host-rustcflags: {}" ,
@@ -218,7 +218,7 @@ pub fn log_config(config: &Config) {
218
218
logv ( c, format_strbuf ! ( "adb_device_status: {}" ,
219
219
config. adb_device_status) ) ;
220
220
match config. test_shard {
221
- None => logv ( c, "test_shard: (all)" . to_strbuf ( ) ) ,
221
+ None => logv ( c, "test_shard: (all)" . to_string ( ) ) ,
222
222
Some ( ( a, b) ) => logv ( c, format_strbuf ! ( "test_shard: {}.{}" , a, b) )
223
223
}
224
224
logv ( c, format_strbuf ! ( "verbose: {}" , config. verbose) ) ;
@@ -234,7 +234,7 @@ pub fn opt_str<'a>(maybestr: &'a Option<String>) -> &'a str {
234
234
235
235
pub fn opt_str2 ( maybestr : Option < String > ) -> String {
236
236
match maybestr {
237
- None => "(none)" . to_strbuf ( ) ,
237
+ None => "(none)" . to_string ( ) ,
238
238
Some ( s) => s,
239
239
}
240
240
}
@@ -314,10 +314,10 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
314
314
// Pretty-printer does not work with .rc files yet
315
315
let valid_extensions =
316
316
match config. mode {
317
- Pretty => vec ! ( ".rs" . to_owned ( ) ) ,
318
- _ => vec ! ( ".rc" . to_owned ( ) , ".rs" . to_owned ( ) )
317
+ Pretty => vec ! ( ".rs" . to_string ( ) ) ,
318
+ _ => vec ! ( ".rc" . to_string ( ) , ".rs" . to_string ( ) )
319
319
} ;
320
- let invalid_prefixes = vec ! ( "." . to_owned ( ) , "#" . to_owned ( ) , "~" . to_owned ( ) ) ;
320
+ let invalid_prefixes = vec ! ( "." . to_string ( ) , "#" . to_string ( ) , "~" . to_string ( ) ) ;
321
321
let name = testfile. filename_str ( ) . unwrap ( ) ;
322
322
323
323
let mut valid = false ;
@@ -367,7 +367,7 @@ pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
367
367
pub fn make_test_closure ( config : & Config , testfile : & Path ) -> test:: TestFn {
368
368
let config = ( * config) . clone ( ) ;
369
369
// FIXME (#9639): This needs to handle non-utf8 paths
370
- let testfile = testfile. as_str ( ) . unwrap ( ) . to_strbuf ( ) ;
370
+ let testfile = testfile. as_str ( ) . unwrap ( ) . to_string ( ) ;
371
371
test:: DynTestFn ( proc ( ) {
372
372
runtest:: run ( config, testfile)
373
373
} )
@@ -376,7 +376,7 @@ pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
376
376
pub fn make_metrics_test_closure ( config : & Config , testfile : & Path ) -> test:: TestFn {
377
377
let config = ( * config) . clone ( ) ;
378
378
// FIXME (#9639): This needs to handle non-utf8 paths
379
- let testfile = testfile. as_str ( ) . unwrap ( ) . to_strbuf ( ) ;
379
+ let testfile = testfile. as_str ( ) . unwrap ( ) . to_string ( ) ;
380
380
test:: DynMetricFn ( proc ( mm) {
381
381
runtest:: run_metrics ( config, testfile, mm)
382
382
} )
0 commit comments