@@ -351,7 +351,10 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
351351 cmds,
352352 "quit" . to_strbuf ( ) ] . connect ( "\n " ) ;
353353 debug ! ( "script_str = {}" , script_str) ;
354- dump_output_file ( config, testfile, script_str, "debugger.script" ) ;
354+ dump_output_file ( config,
355+ testfile,
356+ script_str. as_slice ( ) ,
357+ "debugger.script" ) ;
355358
356359
357360 procsrv:: run ( "" ,
@@ -459,7 +462,10 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
459462 "quit\n " . to_strbuf ( )
460463 ] . connect ( "\n " ) ;
461464 debug ! ( "script_str = {}" , script_str) ;
462- dump_output_file ( config, testfile, script_str, "debugger.script" ) ;
465+ dump_output_file ( config,
466+ testfile,
467+ script_str. as_slice ( ) ,
468+ "debugger.script" ) ;
463469
464470 // run debugger script with gdb
465471 #[ cfg( windows) ]
@@ -538,7 +544,8 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
538544
539545 // Set breakpoints on every line that contains the string "#break"
540546 for line in breakpoint_lines. iter ( ) {
541- script_str. push_str ( format ! ( "breakpoint set --line {}\n " , line) ) ;
547+ script_str. push_str ( format ! ( "breakpoint set --line {}\n " ,
548+ line) . as_slice ( ) ) ;
542549 }
543550
544551 // Append the other commands
@@ -552,7 +559,10 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
552559
553560 // Write the script into a file
554561 debug ! ( "script_str = {}" , script_str) ;
555- dump_output_file ( config, testfile, script_str. into_owned ( ) , "debugger.script" ) ;
562+ dump_output_file ( config,
563+ testfile,
564+ script_str. as_slice ( ) ,
565+ "debugger.script" ) ;
556566 let debugger_script = make_out_name ( config, testfile, "debugger.script" ) ;
557567
558568 // Let LLDB execute the script via lldb_batchmode.py
@@ -609,8 +619,8 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
609619 -> DebuggerCommands {
610620 use std:: io:: { BufferedReader , File } ;
611621
612- let command_directive = debugger_prefix + " -command";
613- let check_directive = debugger_prefix + " -check";
622+ let command_directive = format ! ( "{} -command", debugger_prefix ) ;
623+ let check_directive = format ! ( "{} -check", debugger_prefix ) ;
614624
615625 let mut breakpoint_lines = vec ! ( ) ;
616626 let mut commands = vec ! ( ) ;
@@ -620,18 +630,18 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
620630 for line in reader. lines ( ) {
621631 match line {
622632 Ok ( line) => {
623- if line. contains ( "#break" ) {
633+ if line. as_slice ( ) . contains ( "#break" ) {
624634 breakpoint_lines. push ( counter) ;
625635 }
626636
627637 header:: parse_name_value_directive (
628- line,
638+ line. as_slice ( ) ,
629639 command_directive. to_strbuf ( ) ) . map ( |cmd| {
630640 commands. push ( cmd)
631641 } ) ;
632642
633643 header:: parse_name_value_directive (
634- line,
644+ line. as_slice ( ) ,
635645 check_directive. to_strbuf ( ) ) . map ( |cmd| {
636646 check_lines. push ( cmd)
637647 } ) ;
0 commit comments