Skip to content

Commit

Permalink
Use if let syntax
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Zivota <[email protected]>
  • Loading branch information
benjaminRomano and loewenheim authored May 2, 2024
1 parent 8792018 commit 7a7be36
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions symbolic-debuginfo/src/dwarf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,13 +455,10 @@ impl<'d, 'a> UnitRef<'d, 'a> {
return self.resolve_reference(attr, |ref_unit, ref_entry| {
// Self-references may have a layer of indircetion. Avoid infinite recursion
// in this scenario.
match prior_offset {
Some(prior) => {
if self.offset() == ref_unit.offset() && prior == ref_entry.offset() {
return Ok(None);
}
if let Some(prior) = prior_offset {
if self.offset() == ref_unit.offset() && prior == ref_entry.offset() {
return Ok(None);
}
None => {}
}

if self.offset() != ref_unit.offset() || entry.offset() != ref_entry.offset() {
Expand Down

0 comments on commit 7a7be36

Please sign in to comment.