@@ -602,7 +602,7 @@ impl dyn TestStatus {
602
602
cmd. stdin ( std:: fs:: File :: open ( stdin) . unwrap ( ) ) ;
603
603
}
604
604
605
- let ( cmd, status, stderr, stdout) = self . run_command ( cmd) ?;
605
+ let ( cmd, status, stderr, stdout) = run_command ( cmd) ?;
606
606
607
607
let mode = comments. mode ( revision) ?;
608
608
let cmd = check_test_result (
@@ -629,27 +629,21 @@ impl dyn TestStatus {
629
629
) ?;
630
630
Ok ( TestOk :: Ok )
631
631
}
632
+ }
632
633
633
- /// Run a command, and if it takes more than 100ms, start appending the last stderr/stdout
634
- /// line to the current status spinner.
635
- fn run_command (
636
- & self ,
637
- mut cmd : Command ,
638
- ) -> Result < ( Command , ExitStatus , Vec < u8 > , Vec < u8 > ) , Errored > {
639
- match cmd. output ( ) {
640
- Err ( err) => Err ( Errored {
641
- errors : vec ! [ ] ,
642
- stderr : err. to_string ( ) . into_bytes ( ) ,
643
- stdout : format ! ( "could not spawn `{:?}` as a process" , cmd. get_program( ) )
644
- . into_bytes ( ) ,
645
- command : cmd,
646
- } ) ,
647
- Ok ( Output {
648
- status,
649
- stdout,
650
- stderr,
651
- } ) => Ok ( ( cmd, status, stderr, stdout) ) ,
652
- }
634
+ fn run_command ( mut cmd : Command ) -> Result < ( Command , ExitStatus , Vec < u8 > , Vec < u8 > ) , Errored > {
635
+ match cmd. output ( ) {
636
+ Err ( err) => Err ( Errored {
637
+ errors : vec ! [ ] ,
638
+ stderr : err. to_string ( ) . into_bytes ( ) ,
639
+ stdout : format ! ( "could not spawn `{:?}` as a process" , cmd. get_program( ) ) . into_bytes ( ) ,
640
+ command : cmd,
641
+ } ) ,
642
+ Ok ( Output {
643
+ status,
644
+ stdout,
645
+ stderr,
646
+ } ) => Ok ( ( cmd, status, stderr, stdout) ) ,
653
647
}
654
648
}
655
649
0 commit comments