@@ -327,7 +327,7 @@ impl Scanner {
327327 & mut self ,
328328 changed_content : ChangedContent ,
329329 ) -> Vec < ( String , usize ) > {
330- let ( content, extension ) = read_changed_content ( changed_content) . unwrap_or_default ( ) ;
330+ let content = read_changed_content ( changed_content) . unwrap_or_default ( ) ;
331331 let original_content = & content;
332332
333333 // Workaround for legacy upgrades:
@@ -337,7 +337,7 @@ impl Scanner {
337337 let content = content. replace ( "-[]" , "XYZ" ) ;
338338 let offset = content. as_ptr ( ) as usize ;
339339
340- let mut extractor = Extractor :: new ( & content[ ..] , Some ( & extension ) ) ;
340+ let mut extractor = Extractor :: new ( & content[ ..] ) ;
341341
342342 extractor
343343 . extract ( )
@@ -364,7 +364,7 @@ impl Scanner {
364364 }
365365}
366366
367- fn read_changed_content ( c : ChangedContent ) -> Option < ( Vec < u8 > , String ) > {
367+ fn read_changed_content ( c : ChangedContent ) -> Option < Vec < u8 > > {
368368 let ( content, extension) = match c {
369369 ChangedContent :: File ( file, extension) => match std:: fs:: read ( & file) {
370370 Ok ( content) => ( content, extension) ,
@@ -377,7 +377,7 @@ fn read_changed_content(c: ChangedContent) -> Option<(Vec<u8>, String)> {
377377 ChangedContent :: Content ( contents, extension) => ( contents. into_bytes ( ) , extension) ,
378378 } ;
379379
380- Some ( ( pre_process_input ( & content, & extension ) , extension) )
380+ Some ( pre_process_input ( & content, & extension) )
381381}
382382
383383pub fn pre_process_input ( content : & [ u8 ] , extension : & str ) -> Vec < u8 > {
@@ -398,7 +398,7 @@ pub fn pre_process_input(content: &[u8], extension: &str) -> Vec<u8> {
398398}
399399
400400#[ tracing:: instrument( skip_all) ]
401- fn read_all_files ( changed_content : Vec < ChangedContent > ) -> Vec < ( Vec < u8 > , String ) > {
401+ fn read_all_files ( changed_content : Vec < ChangedContent > ) -> Vec < Vec < u8 > > {
402402 event ! (
403403 tracing:: Level :: INFO ,
404404 "Reading {:?} file(s)" ,
@@ -412,16 +412,16 @@ fn read_all_files(changed_content: Vec<ChangedContent>) -> Vec<(Vec<u8>, String)
412412}
413413
414414#[ tracing:: instrument( skip_all) ]
415- fn parse_all_blobs ( blobs : Vec < ( Vec < u8 > , String ) > ) -> Vec < String > {
415+ fn parse_all_blobs ( blobs : Vec < Vec < u8 > > ) -> Vec < String > {
416416 let mut result: Vec < _ > = blobs
417417 . par_iter ( )
418- . flat_map ( |( blob, extension ) | blob. par_split ( |x| * x == b'\n' ) . map ( move |x| ( x , extension ) ) )
419- . filter_map ( |( blob, extension ) | {
418+ . flat_map ( |blob| blob. par_split ( |x| * x == b'\n' ) )
419+ . filter_map ( |blob| {
420420 if blob. is_empty ( ) {
421421 return None ;
422422 }
423423
424- let extracted = crate :: extractor:: Extractor :: new ( blob, Some ( extension ) ) . extract ( ) ;
424+ let extracted = crate :: extractor:: Extractor :: new ( blob) . extract ( ) ;
425425 if extracted. is_empty ( ) {
426426 return None ;
427427 }
0 commit comments