Skip to content

Commit

Permalink
rework code so we have a single return place
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
  • Loading branch information
otavio committed May 22, 2023
1 parent b883dee commit e35f3bc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl<R: Read + Seek> Iterator for ArchiveIterator<R> {
return None;
}

let next = loop {
loop {
let next = if self.in_file {
unsafe { self.next_data_chunk() }
} else {
Expand Down Expand Up @@ -104,9 +104,7 @@ impl<R: Read + Seek> Iterator for ArchiveIterator<R> {
break Some(next);
}
}
};

next
}
}
}

Expand Down

0 comments on commit e35f3bc

Please sign in to comment.