File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ mod baseline {
3434        "filename" , 
3535    ] ; 
3636
37+     fn  is_known_header_field ( field :  & & str )  -> bool  { 
38+         HEADER_FIELDS . contains ( field) 
39+     } 
40+ 
3741    impl < ' a >  Baseline < ' a >  { 
3842        pub  fn  collect ( baseline_path :  impl  AsRef < Path > )  -> std:: io:: Result < Vec < BlameEntry > >  { 
3943            let  content = std:: fs:: read ( baseline_path) ?; 
@@ -89,7 +93,7 @@ mod baseline {
8993                        ( line_number_in_final_file - 1 ) ..( line_number_in_final_file + number_of_lines_in_group - 1 ) ; 
9094                    assert ! ( ranges. is_none( ) ,  "should not overwrite existing ranges" ) ; 
9195                    ranges = Some ( ( blame_range,  original_range) ) ; 
92-                 }  else  if  !HEADER_FIELDS . contains ( & fields[ 0 ] )  && ObjectId :: from_hex ( fields[ 0 ] . as_bytes ( ) ) . is_err ( )  { 
96+                 }  else  if  !is_known_header_field ( & fields[ 0 ] )  && ObjectId :: from_hex ( fields[ 0 ] . as_bytes ( ) ) . is_err ( )  { 
9397                    panic ! ( "unexpected line: '{:?}'" ,  line. as_bstr( ) ) ; 
9498                } 
9599            } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments