Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanTsune committed Aug 13, 2023
1 parent 60ea025 commit d2ba657
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/src/archive/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ fn decompress_reader<'r, R: Read>(
compression: Compression,
) -> io::Result<DecompressReader<'r, R>> {
Ok(match compression {
Compression::No => DecompressReader::Store(reader),
Compression::No => DecompressReader::No(reader),
Compression::Deflate => DecompressReader::Deflate(flate2::read::ZlibDecoder::new(reader)),
Compression::ZStandard => DecompressReader::ZStd(zstd::Decoder::new(reader)?),
Compression::XZ => DecompressReader::Xz(xz2::read::XzDecoder::new(reader)),
Expand Down
4 changes: 2 additions & 2 deletions lib/src/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl<'w, W: Write> TryIntoInner<W> for CompressionWriter<'w, W> {
impl<'w, W: Write> TryIntoInnerWrite<W> for CompressionWriter<'w, W> {}

pub(crate) enum DecompressReader<'r, R: Read> {
Store(R),
No(R),
Deflate(ZlibDecoder<R>),
ZStd(ZStdDecoder<'r, BufReader<R>>),
Xz(XzDecoder<R>),
Expand All @@ -58,7 +58,7 @@ pub(crate) enum DecompressReader<'r, R: Read> {
impl<'r, R: Read> Read for DecompressReader<'r, R> {
fn read(&mut self, buf: &mut [u8]) -> Result<usize> {
match self {
DecompressReader::Store(r) => r.read(buf),
DecompressReader::No(r) => r.read(buf),
DecompressReader::Deflate(r) => r.read(buf),
DecompressReader::ZStd(r) => r.read(buf),
DecompressReader::Xz(r) => r.read(buf),
Expand Down

0 comments on commit d2ba657

Please sign in to comment.