Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove now-dead code
  • Loading branch information
cosmicexplorer committed Jul 16, 2024
commit fd11f2892e83928d0f00191dbc155c7d259eb83d
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