@@ -154,7 +154,7 @@ fn run_git(args: &[~str], env: Option<~[(~str, ~str)]>, cwd: &Path, err_msg: &st
154154 let rslt = prog. finish_with_output ( ) ;
155155 if !rslt. status . success ( ) {
156156 fail ! ( "{} [git returned {:?}, output = {}, error = {}]" , err_msg,
157- rslt. status, str :: from_utf8_slice ( rslt. output) , str :: from_utf8_slice ( rslt. error) ) ;
157+ rslt. status, str :: from_utf8 ( rslt. output) , str :: from_utf8 ( rslt. error) ) ;
158158 }
159159}
160160
@@ -290,13 +290,13 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s
290290 } ) ;
291291 let output = prog. finish_with_output ( ) ;
292292 debug ! ( "Output from command {} with args {:?} was {} \\ {{}\\ }[{:?}]" ,
293- cmd, args, str :: from_utf8_slice ( output. output) ,
294- str :: from_utf8_slice ( output. error) ,
293+ cmd, args, str :: from_utf8 ( output. output) ,
294+ str :: from_utf8 ( output. error) ,
295295 output. status) ;
296296 if !output. status . success ( ) {
297- debug ! ( "Command {} {:?} failed with exit code {:?}; its output was --- {} ---" ,
297+ debug ! ( "Command {} {:?} failed with exit code {:?}; its output was --- {} {} ---" ,
298298 cmd, args, output. status,
299- str :: from_utf8_slice ( output. output) + str :: from_utf8_slice ( output. error) ) ;
299+ str :: from_utf8 ( output. output) , str :: from_utf8 ( output. error) ) ;
300300 Fail ( output)
301301 }
302302 else {
@@ -455,7 +455,7 @@ fn built_library_exists(repo: &Path, short_name: &str) -> bool {
455455fn command_line_test_output ( args : & [ ~str ] ) -> ~[ ~str ] {
456456 let mut result = ~[ ] ;
457457 let p_output = command_line_test ( args, & os:: getcwd ( ) ) ;
458- let test_output = str:: from_utf8_slice ( p_output. output ) ;
458+ let test_output = str:: from_utf8 ( p_output. output ) ;
459459 for s in test_output. split ( '\n' ) {
460460 result. push ( s. to_owned ( ) ) ;
461461 }
@@ -469,7 +469,7 @@ fn command_line_test_output_with_env(args: &[~str], env: ~[(~str, ~str)]) -> ~[~
469469 Fail ( _) => fail ! ( "Command-line test failed" ) ,
470470 Success ( r) => r
471471 } ;
472- let test_output = str:: from_utf8_slice ( p_output. output ) ;
472+ let test_output = str:: from_utf8 ( p_output. output ) ;
473473 for s in test_output. split ( '\n' ) {
474474 result. push ( s. to_owned ( ) ) ;
475475 }
@@ -1212,7 +1212,7 @@ fn test_uninstall() {
12121212 let workspace = create_local_package(&PkgId::new(" foo"));
12131213 command_line_test([~" uninstall", ~" foo"], workspace.path());
12141214 let output = command_line_test([~" list"], workspace.path());
1215- assert!(!str::from_utf8_slice (output.output).contains(" foo"));
1215+ assert!(!str::from_utf8 (output.output).contains(" foo"));
12161216}
12171217
12181218#[test]
@@ -1282,8 +1282,8 @@ fn test_extern_mod() {
12821282 let outp = prog. finish_with_output ( ) ;
12831283 if !outp. status . success ( ) {
12841284 fail ! ( "output was {}, error was {}" ,
1285- str :: from_utf8_slice ( outp. output) ,
1286- str :: from_utf8_slice ( outp. error) ) ;
1285+ str :: from_utf8 ( outp. output) ,
1286+ str :: from_utf8 ( outp. error) ) ;
12871287 }
12881288 assert ! ( exec_file. exists( ) && is_executable( & exec_file) ) ;
12891289}
@@ -1337,8 +1337,8 @@ fn test_extern_mod_simpler() {
13371337 let outp = prog. finish_with_output ( ) ;
13381338 if !outp. status . success ( ) {
13391339 fail ! ( "output was {}, error was {}" ,
1340- str :: from_utf8_slice ( outp. output) ,
1341- str :: from_utf8_slice ( outp. error) ) ;
1340+ str :: from_utf8 ( outp. output) ,
1341+ str :: from_utf8 ( outp. error) ) ;
13421342 }
13431343 assert ! ( exec_file. exists( ) && is_executable( & exec_file) ) ;
13441344}
@@ -2101,7 +2101,7 @@ fn test_rustpkg_test_creates_exec() {
21012101fn test_rustpkg_test_output() {
21022102 let workspace = create_local_package_with_test(&PkgId::new(" foo"));
21032103 let output = command_line_test([~" test", ~" foo"], workspace.path());
2104- let output_str = str::from_utf8_slice (output.output);
2104+ let output_str = str::from_utf8 (output.output);
21052105 // The first two assertions are separate because test output may
21062106 // contain color codes, which could appear between " test f" and " ok".
21072107 assert!(output_str.contains(" test f"));
@@ -2132,7 +2132,7 @@ fn test_rustpkg_test_cfg() {
21322132 " #[ test] #[ cfg( not( foobar) ) ] fn f( ) { assert!( 'a' != 'a' ) ; } ");
21332133 let output = command_line_test([~" test", ~" --cfg", ~" foobar", ~" foo"],
21342134 foo_workspace);
2135- let output_str = str::from_utf8_slice (output.output);
2135+ let output_str = str::from_utf8 (output.output);
21362136 assert!(output_str.contains(" 0 passed; 0 failed; 0 ignored; 0 measured"));
21372137}
21382138
@@ -2430,8 +2430,8 @@ fn correct_error_dependency() {
24302430 Fail(ProcessOutput{ error: error, output: output, .. }) => {
24312431 assert!(str::is_utf8(error));
24322432 assert!(str::is_utf8(output));
2433- let error_str = str::from_utf8_slice (error);
2434- let out_str = str::from_utf8_slice (output);
2433+ let error_str = str::from_utf8 (error);
2434+ let out_str = str::from_utf8 (output);
24352435 debug!(" ss = { } ", error_str);
24362436 debug!(" out_str = { } ", out_str);
24372437 if out_str.contains(" Package badpkg depends on some_package_that_doesnt_exist") &&
0 commit comments