@@ -588,7 +588,7 @@ async fn run_process_async(executable: &str, args: Option<Vec<String>>, input: O
588
588
if let Some ( input) = input {
589
589
trace ! ( "Writing to command STDIN: {input}" ) ;
590
590
let mut stdin = child. stdin . take ( ) . expect ( "child did not have a handle to stdin" ) ;
591
- stdin. write ( input. as_bytes ( ) ) . await . expect ( "could not write to stdin" ) ;
591
+ stdin. write_all ( input. as_bytes ( ) ) . await . expect ( "could not write to stdin" ) ;
592
592
drop ( stdin) ;
593
593
}
594
594
@@ -609,7 +609,7 @@ async fn run_process_async(executable: &str, args: Option<Vec<String>>, input: O
609
609
stdout_result. push_str ( & line) ;
610
610
stdout_result. push ( '\n' ) ;
611
611
}
612
- return stdout_result
612
+ stdout_result
613
613
} ) ;
614
614
615
615
let stderr_task = tokio:: spawn ( async move {
@@ -621,7 +621,7 @@ async fn run_process_async(executable: &str, args: Option<Vec<String>>, input: O
621
621
filtered_stderr. push ( '\n' ) ;
622
622
}
623
623
}
624
- return filtered_stderr
624
+ filtered_stderr
625
625
} ) ;
626
626
627
627
let exit_code = child_task. await . unwrap ( ) ?. code ( ) ;
@@ -641,10 +641,11 @@ async fn run_process_async(executable: &str, args: Option<Vec<String>>, input: O
641
641
return Err ( DscError :: Command ( executable. to_string ( ) , code, stderr_result) ) ;
642
642
}
643
643
644
- Ok ( ( code, stdout_result, stderr_result) ) } ,
644
+ Ok ( ( code, stdout_result, stderr_result) )
645
+ } ,
645
646
None => {
646
647
debug ! ( "Process '{executable}' id {child_id} terminated by signal" ) ;
647
- return Err ( DscError :: CommandOperation ( "Process terminated by signal" . to_string ( ) , executable. to_string ( ) ) ) ;
648
+ Err ( DscError :: CommandOperation ( "Process terminated by signal" . to_string ( ) , executable. to_string ( ) ) )
648
649
}
649
650
}
650
651
}
@@ -840,5 +841,5 @@ pub fn log_stderr_line<'a>(process_id: &u32, trace_line: &'a str) -> &'a str
840
841
}
841
842
} ;
842
843
843
- return "" ;
844
+ ""
844
845
}
0 commit comments