File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -107,12 +107,14 @@ pub(crate) fn update_llvm_submodule(build: &Build) {
107107 }
108108
109109 // check_submodule
110+ let buf;
110111 let checked_out = if build. config . fast_submodules {
111- Some ( output (
112+ buf = output (
112113 Command :: new ( "git" )
113114 . args ( & [ "rev-parse" , "HEAD" ] )
114115 . current_dir ( build. config . src . join ( llvm_project) ) ,
115- ) )
116+ ) ;
117+ Some ( buf. trim_end ( ) )
116118 } else {
117119 None
118120 } ;
@@ -124,8 +126,10 @@ pub(crate) fn update_llvm_submodule(build: &Build) {
124126 . arg ( llvm_project)
125127 . current_dir ( & build. config . src ) ,
126128 ) ;
127- let hash =
128- recorded. split ( ' ' ) . nth ( 2 ) . unwrap_or_else ( || panic ! ( "unexpected output `{}`" , recorded) ) ;
129+ let hash = recorded
130+ . split_whitespace ( )
131+ . nth ( 2 )
132+ . unwrap_or_else ( || panic ! ( "unexpected output `{}`" , recorded) ) ;
129133
130134 // update_submodule
131135 if let Some ( llvm_hash) = checked_out {
You can’t perform that action at this time.
0 commit comments