diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:36 +0000 |
commit | e02c5b5930c2c9ba3e5423fe12e2ef0155017297 (patch) | |
tree | fd60ebbbb5299e16e5fca8c773ddb74f764760db /vendor/gix-features/src/zlib | |
parent | Adding debian version 1.73.0+dfsg1-1. (diff) | |
download | rustc-e02c5b5930c2c9ba3e5423fe12e2ef0155017297.tar.xz rustc-e02c5b5930c2c9ba3e5423fe12e2ef0155017297.zip |
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-features/src/zlib')
-rw-r--r-- | vendor/gix-features/src/zlib/stream/inflate.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/vendor/gix-features/src/zlib/stream/inflate.rs b/vendor/gix-features/src/zlib/stream/inflate.rs index f68f45f57..11dc92800 100644 --- a/vendor/gix-features/src/zlib/stream/inflate.rs +++ b/vendor/gix-features/src/zlib/stream/inflate.rs @@ -2,23 +2,6 @@ use std::{io, io::BufRead}; use flate2::{Decompress, FlushDecompress, Status}; -/// The boxed variant is faster for what we do (moving the decompressor in and out a lot) -pub struct ReadBoxed<R> { - /// The reader from which bytes should be decompressed. - pub inner: R, - /// The decompressor doing all the work. - pub decompressor: Box<Decompress>, -} - -impl<R> io::Read for ReadBoxed<R> -where - R: BufRead, -{ - fn read(&mut self, into: &mut [u8]) -> io::Result<usize> { - read(&mut self.inner, &mut self.decompressor, into) - } -} - /// Read bytes from `rd` and decompress them using `state` into a pre-allocated fitting buffer `dst`, returning the amount of bytes written. pub fn read(rd: &mut impl BufRead, state: &mut Decompress, mut dst: &mut [u8]) -> io::Result<usize> { let mut total_written = 0; |