Skip to content

Remove R: Read bounds on structs #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions src/deflate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ pub struct EncoderWriter<W: Write> {
///
/// This structure implements a `Read` interface and will read uncompressed
/// data from an underlying stream and emit a stream of compressed data.
pub struct EncoderReader<R: Read> {
pub struct EncoderReader {
inner: EncoderReaderBuf<BufReader<R>>,
}

/// A DEFLATE encoder, or compressor.
///
/// This structure implements a `BufRead` interface and will read uncompressed
/// data from an underlying stream and emit a stream of compressed data.
pub struct EncoderReaderBuf<R: BufRead> {
pub struct EncoderReaderBuf {
obj: R,
data: Compress,
}
Expand All @@ -42,15 +42,15 @@ pub struct EncoderReaderBuf<R: BufRead> {
///
/// This structure implements a `Read` interface and takes a stream of
/// compressed data as input, providing the decompressed data when read from.
pub struct DecoderReader<R: Read> {
pub struct DecoderReader {
inner: DecoderReaderBuf<BufReader<R>>,
}

/// A DEFLATE decoder, or decompressor.
///
/// This structure implements a `BufRead` interface and takes a stream of
/// compressed data as input, providing the decompressed data when read from.
pub struct DecoderReaderBuf<R: BufRead> {
pub struct DecoderReaderBuf {
obj: R,
data: Decompress,
}
Expand Down
12 changes: 6 additions & 6 deletions src/gz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct EncoderWriter<W: Write> {
/// This structure exposes a `Read` interface that will read uncompressed data
/// from the underlying reader and expose the compressed version as a `Read`
/// interface.
pub struct EncoderReader<R: Read> {
pub struct EncoderReader {
inner: EncoderReaderBuf<BufReader<R>>,
}

Expand All @@ -50,7 +50,7 @@ pub struct EncoderReader<R: Read> {
/// This structure exposes a `Read` interface that will read uncompressed data
/// from the underlying reader and expose the compressed version as a `Read`
/// interface.
pub struct EncoderReaderBuf<R: BufRead> {
pub struct EncoderReaderBuf {
inner: deflate::EncoderReaderBuf<CrcReader<R>>,
header: Vec<u8>,
pos: usize,
Expand All @@ -71,7 +71,7 @@ pub struct Builder {
///
/// This structure exposes a `Read` interface that will consume compressed
/// data from the underlying reader and emit uncompressed data.
pub struct DecoderReader<R: Read> {
pub struct DecoderReader {
inner: DecoderReaderBuf<BufReader<R>>,
}

Expand All @@ -86,15 +86,15 @@ pub struct DecoderReader<R: Read> {
///
/// This structure exposes a `Read` interface that will consume all gzip members
/// from the underlying reader and emit uncompressed data.
pub struct MultiDecoderReader<R: Read> {
pub struct MultiDecoderReader {
inner: MultiDecoderReaderBuf<BufReader<R>>,
}

/// A gzip streaming decoder
///
/// This structure exposes a `Read` interface that will consume compressed
/// data from the underlying reader and emit uncompressed data.
pub struct DecoderReaderBuf<R: BufRead> {
pub struct DecoderReaderBuf {
inner: CrcReader<deflate::DecoderReaderBuf<R>>,
header: Header,
finished: bool,
Expand All @@ -111,7 +111,7 @@ pub struct DecoderReaderBuf<R: BufRead> {
///
/// This structure exposes a `Read` interface that will consume all gzip members
/// from the underlying reader and emit uncompressed data.
pub struct MultiDecoderReaderBuf<R: BufRead> {
pub struct MultiDecoderReaderBuf {
inner: CrcReader<deflate::DecoderReaderBuf<R>>,
header: Header,
finished: bool,
Expand Down