@@ -493,11 +493,14 @@ impl Build {
493493 let submodule_git = || helpers:: git ( Some ( & absolute_path) ) ;
494494
495495 // Determine commit checked out in submodule.
496- let checked_out_hash = output ( & mut submodule_git ( ) . args ( [ "rev-parse" , "HEAD" ] ) . command ) ;
496+ let checked_out_hash = output ( submodule_git ( ) . args ( [ "rev-parse" , "HEAD" ] ) . as_command_mut ( ) ) ;
497497 let checked_out_hash = checked_out_hash. trim_end ( ) ;
498498 // Determine commit that the submodule *should* have.
499499 let recorded = output (
500- & mut helpers:: git ( Some ( & self . src ) ) . args ( [ "ls-tree" , "HEAD" ] ) . arg ( relative_path) . command ,
500+ helpers:: git ( Some ( & self . src ) )
501+ . args ( [ "ls-tree" , "HEAD" ] )
502+ . arg ( relative_path)
503+ . as_command_mut ( ) ,
501504 ) ;
502505 let actual_hash = recorded
503506 . split_whitespace ( )
@@ -522,7 +525,7 @@ impl Build {
522525 let current_branch = {
523526 let output = helpers:: git ( Some ( & self . src ) )
524527 . args ( [ "symbolic-ref" , "--short" , "HEAD" ] )
525- . command
528+ . as_command_mut ( )
526529 . stderr ( Stdio :: inherit ( ) )
527530 . output ( ) ;
528531 let output = t ! ( output) ;
@@ -548,7 +551,7 @@ impl Build {
548551 git
549552 } ;
550553 // NOTE: doesn't use `try_run` because this shouldn't print an error if it fails.
551- if !update ( true ) . command . status ( ) . map_or ( false , |status| status. success ( ) ) {
554+ if !update ( true ) . as_command_mut ( ) . status ( ) . map_or ( false , |status| status. success ( ) ) {
552555 update ( false ) . run ( self ) ;
553556 }
554557
@@ -941,10 +944,12 @@ impl Build {
941944
942945 self . verbose ( || println ! ( "running: {command:?}" ) ) ;
943946
944- command. command . stdout ( command. stdout . stdio ( ) ) ;
945- command. command . stderr ( command. stderr . stdio ( ) ) ;
947+ let stdout = command. stdout . stdio ( ) ;
948+ command. as_command_mut ( ) . stdout ( stdout) ;
949+ let stderr = command. stderr . stdio ( ) ;
950+ command. as_command_mut ( ) . stderr ( stderr) ;
946951
947- let output = command. command . output ( ) ;
952+ let output = command. as_command_mut ( ) . output ( ) ;
948953
949954 use std:: fmt:: Write ;
950955
@@ -1931,7 +1936,7 @@ fn envify(s: &str) -> String {
19311936pub fn generate_smart_stamp_hash ( dir : & Path , additional_input : & str ) -> String {
19321937 let diff = helpers:: git ( Some ( dir) )
19331938 . arg ( "diff" )
1934- . command
1939+ . as_command_mut ( )
19351940 . output ( )
19361941 . map ( |o| String :: from_utf8 ( o. stdout ) . unwrap_or_default ( ) )
19371942 . unwrap_or_default ( ) ;
@@ -1941,7 +1946,7 @@ pub fn generate_smart_stamp_hash(dir: &Path, additional_input: &str) -> String {
19411946 . arg ( "--porcelain" )
19421947 . arg ( "-z" )
19431948 . arg ( "--untracked-files=normal" )
1944- . command
1949+ . as_command_mut ( )
19451950 . output ( )
19461951 . map ( |o| String :: from_utf8 ( o. stdout ) . unwrap_or_default ( ) )
19471952 . unwrap_or_default ( ) ;
0 commit comments