diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
commit | dc0db358abe19481e475e10c32149b53370f1a1c (patch) | |
tree | ab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/gix-features/src/zlib/stream/inflate.rs | |
parent | Releasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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")), } } |