Skip to content

Commit

Permalink
Decomplexify match
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Feb 10, 2024
1 parent 5491eed commit 91efcfe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rc-zip/src/fsm/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,11 @@ impl ArchiveFsm {
return Ok(FsmResult::Continue(self));
}

match {
let res = {
let haystack = &self.buffer.data()[..haystack_size as usize];
EndOfCentralDirectoryRecord::find_in_block(haystack)
} {
};
match res {
None => Err(FormatError::DirectoryEndSignatureNotFound.into()),
Some(eocdr) => {
trace!(
Expand Down

0 comments on commit 91efcfe

Please sign in to comment.