diff options
Diffstat (limited to 'vendor/gix-features/src/zlib/stream/inflate.rs')
-rw-r--r-- | vendor/gix-features/src/zlib/stream/inflate.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/gix-features/src/zlib/stream/inflate.rs b/vendor/gix-features/src/zlib/stream/inflate.rs index 007ecedc6..f68f45f57 100644 --- a/vendor/gix-features/src/zlib/stream/inflate.rs +++ b/vendor/gix-features/src/zlib/stream/inflate.rs @@ -46,11 +46,11 @@ pub fn read(rd: &mut impl BufRead, state: &mut Decompress, mut dst: &mut [u8]) - // The stream has officially ended, nothing more to do here. Ok(Status::StreamEnd) => return Ok(total_written), // Either input our output are depleted even though the stream is not depleted yet. - Ok(Status::Ok) | Ok(Status::BufError) if eof || dst.is_empty() => return Ok(total_written), + Ok(Status::Ok | Status::BufError) if eof || dst.is_empty() => return Ok(total_written), // Some progress was made in both the input and the output, it must continue to reach the end. - Ok(Status::Ok) | Ok(Status::BufError) if consumed != 0 || written != 0 => continue, + Ok(Status::Ok | Status::BufError) if consumed != 0 || written != 0 => continue, // A strange state, where zlib makes no progress but isn't done either. Call it out. - Ok(Status::Ok) | Ok(Status::BufError) => unreachable!("Definitely a bug somewhere"), + Ok(Status::Ok | Status::BufError) => unreachable!("Definitely a bug somewhere"), Err(..) => return Err(io::Error::new(io::ErrorKind::InvalidInput, "corrupt deflate stream")), } } |