File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed 
src/bootstrap/src/core/builder Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1839,9 +1839,14 @@ pub fn pretty_step_name<S: Step>() -> String {
18391839/// Renders `step` using its `Debug` implementation and extract the field arguments out of it. 
18401840fn  step_debug_args < S :  Step > ( step :  & S )  -> String  { 
18411841    let  step_dbg_repr = format ! ( "{step:?}" ) ; 
1842-     let  brace_start = step_dbg_repr. find ( '{' ) . unwrap_or ( 0 ) ; 
1843-     let  brace_end = step_dbg_repr. rfind ( '}' ) . unwrap_or ( step_dbg_repr. len ( ) ) ; 
1844-     step_dbg_repr[ brace_start + 1 ..brace_end - 1 ] . trim ( ) . to_string ( ) 
1842+ 
1843+     // Some steps do not have any arguments, so they do not have the braces 
1844+     match  ( step_dbg_repr. find ( '{' ) ,  step_dbg_repr. rfind ( '}' ) )  { 
1845+         ( Some ( brace_start) ,  Some ( brace_end) )  => { 
1846+             step_dbg_repr[ brace_start + 1 ..brace_end - 1 ] . trim ( ) . to_string ( ) 
1847+         } 
1848+         _ => step_dbg_repr, 
1849+     } 
18451850} 
18461851
18471852fn  pretty_print_step < S :  Step > ( step :  & S )  -> String  { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments