@@ -580,7 +580,7 @@ impl<'file> InProgressDwarfPackage<'file> {
580
580
581
581
for section in input. sections ( ) {
582
582
let data;
583
- let ( is_debug_types , mut iter) = match section. name ( ) {
583
+ let mut iter = match section. name ( ) {
584
584
Ok ( ".debug_info.dwo" | ".zdebug_info.dwo" )
585
585
// Report an error if a input DWARF package has multiple `.debug_info`
586
586
// sections.
@@ -591,11 +591,8 @@ impl<'file> InProgressDwarfPackage<'file> {
591
591
Ok ( ".debug_info.dwo" | ".zdebug_info.dwo" ) => {
592
592
data = section. compressed_data ( ) ?. decompress ( ) ?;
593
593
seen_debug_info = true ;
594
- (
595
- false ,
596
- UnitHeaderIterator :: DebugInfo (
597
- gimli:: DebugInfo :: new ( & data, self . endian ) . units ( ) ,
598
- ) ,
594
+ UnitHeaderIterator :: DebugInfo (
595
+ gimli:: DebugInfo :: new ( & data, self . endian ) . units ( ) ,
599
596
)
600
597
}
601
598
Ok ( ".debug_types.dwo" | ".zdebug_types.dwo" )
@@ -608,11 +605,8 @@ impl<'file> InProgressDwarfPackage<'file> {
608
605
Ok ( ".debug_types.dwo" | ".zdebug_types.dwo" ) => {
609
606
data = section. compressed_data ( ) ?. decompress ( ) ?;
610
607
seen_debug_types = true ;
611
- (
612
- true ,
613
- UnitHeaderIterator :: DebugTypes (
614
- gimli:: DebugTypes :: new ( & data, self . endian ) . units ( ) ,
615
- ) ,
608
+ UnitHeaderIterator :: DebugTypes (
609
+ gimli:: DebugTypes :: new ( & data, self . endian ) . units ( ) ,
616
610
)
617
611
}
618
612
_ => continue ,
@@ -658,11 +652,11 @@ impl<'file> InProgressDwarfPackage<'file> {
658
652
. map_err ( Error :: DecompressData ) ?
659
653
. ok_or ( Error :: EmptyUnit ( id. index ( ) ) ) ?;
660
654
661
- let ( debug_info, debug_types) = match id {
662
- DwarfObject :: Type ( _) if is_debug_types => {
655
+ let ( debug_info, debug_types) = match ( & iter , id ) {
656
+ ( UnitHeaderIterator :: DebugTypes ( _ ) , DwarfObject :: Type ( _) ) => {
663
657
( None , self . obj . append_to_debug_types ( data) )
664
658
}
665
- DwarfObject :: Compilation ( _) | DwarfObject :: Type ( _) => {
659
+ ( _ , DwarfObject :: Compilation ( _) | DwarfObject :: Type ( _) ) => {
666
660
( self . obj . append_to_debug_info ( data) , None )
667
661
}
668
662
} ;
0 commit comments