Skip to content

Commit

Permalink
remove now-dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Jul 16, 2024
1 parent 872bd35 commit fd11f28
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 32 deletions.
7 changes: 0 additions & 7 deletions src/aes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,6 @@ impl<R: Read> Read for AesReaderValid<R> {
}
}

impl<R> AesReaderValid<R> {
/// Consumes this decoder, returning the underlying reader.
pub fn into_inner(self) -> R {
self.reader
}
}

pub struct AesWriter<W> {
writer: W,
cipher: Cipher,
Expand Down
5 changes: 0 additions & 5 deletions src/crc32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ impl<R> Crc32Reader<R> {
Err("Invalid checksum")
}
}

#[allow(dead_code)]
pub fn into_inner(self) -> R {
self.inner
}
}

impl<R: Read> Read for Crc32Reader<R> {
Expand Down
7 changes: 1 addition & 6 deletions src/read/lzma.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use lzma_rs::decompress::{Options, Stream, UnpackedSize};
use std::collections::VecDeque;
use std::io::{copy, Error, Read, Result, Write};
use std::io::{Read, Result, Write};

const COMPRESSED_BYTES_TO_BUFFER: usize = 4096;

Expand All @@ -23,11 +23,6 @@ impl<R: Read> LzmaDecoder<R> {
stream: Stream::new_with_options(&OPTIONS, VecDeque::new()),
}
}

pub fn finish(mut self) -> Result<VecDeque<u8>> {
copy(&mut self.compressed_reader, &mut self.stream)?;
self.stream.finish().map_err(Error::from)
}
}

impl<R: Read> Read for LzmaDecoder<R> {
Expand Down
6 changes: 0 additions & 6 deletions src/read/xz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,3 @@ impl<R: Read> Read for XzDecoder<R> {
Ok(written)
}
}

impl<R: Read> XzDecoder<R> {
pub fn into_inner(self) -> R {
self.compressed_reader.into_inner()
}
}
8 changes: 0 additions & 8 deletions src/zipcrypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,6 @@ impl<R: std::io::Read> std::io::Read for ZipCryptoReaderValid<R> {
}
}

impl<R> ZipCryptoReaderValid<R> {
/// Consumes this decoder, returning the underlying reader.
#[allow(dead_code)]
pub fn into_inner(self) -> R {
self.reader.file
}
}

static CRCTABLE: [u32; 256] = [
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
Expand Down

0 comments on commit fd11f28

Please sign in to comment.