From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/gix-features/src/zlib/stream/inflate.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vendor/gix-features/src/zlib/stream/inflate.rs') 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")), } } -- cgit v1.2.3