Skip to content

Commit

Permalink
chore(deps): update rust crate proptest to 1.4.0 (#36)
Browse files Browse the repository at this point in the history
* chore(deps): update rust crate proptest to 1.4.0

* chore: work around rust-lang/rust#117796

These changes work around a recent change in rustdoc's behavior. The
patch was suggested by @Nemo157.

* chore: fix test compilation under non-std

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alejandro González <me@alegon.dev>
  • Loading branch information
renovate[bot] and AlexTMjugador committed Nov 11, 2023
1 parent 2c857de commit ed7c9cd
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ typed-arena = { version = "2.0.2", default-features = false }
log = "0.4.20"

[dev-dependencies]
proptest = "1.3.0"
proptest = "1.4.0"
proptest-derive = "0.4.0"
miniz_oxide = "0.7.1"

Expand Down
12 changes: 12 additions & 0 deletions src/deflate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,18 @@ impl<W: Write> Drop for DeflateEncoder<W> {
}
}

// Boilerplate to make latest Rustdoc happy: https://github.com/rust-lang/rust/issues/117796
#[cfg(all(doc, feature = "std"))]
impl<W: crate::io::Write> std::io::Write for DeflateEncoder<W> {
fn write(&mut self, _buf: &[u8]) -> std::io::Result<usize> {
unimplemented!()
}

fn flush(&mut self) -> std::io::Result<()> {
unimplemented!()
}
}

/// Deflate a part, to allow for chunked, streaming compression with [`DeflateEncoder`].
/// It is possible to call this function multiple times in a row, shifting
/// instart and inend to next bytes of the data. If instart is larger than 0, then
Expand Down
12 changes: 12 additions & 0 deletions src/gzip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,15 @@ impl<W: Write> Drop for GzipEncoder<W> {
self._finish().ok();
}
}

// Boilerplate to make latest Rustdoc happy: https://github.com/rust-lang/rust/issues/117796
#[cfg(all(doc, feature = "std"))]
impl<W: crate::io::Write> std::io::Write for GzipEncoder<W> {
fn write(&mut self, _buf: &[u8]) -> std::io::Result<usize> {
unimplemented!()
}

fn flush(&mut self) -> std::io::Result<()> {
unimplemented!()
}
}
12 changes: 12 additions & 0 deletions src/zlib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,15 @@ impl<W: Write> Drop for ZlibEncoder<W> {
self._finish().ok();
}
}

// Boilerplate to make latest Rustdoc happy: https://github.com/rust-lang/rust/issues/117796
#[cfg(all(doc, feature = "std"))]
impl<W: crate::io::Write> std::io::Write for ZlibEncoder<W> {
fn write(&mut self, _buf: &[u8]) -> std::io::Result<usize> {
unimplemented!()
}

fn flush(&mut self) -> std::io::Result<()> {
unimplemented!()
}
}

0 comments on commit ed7c9cd

Please sign in to comment.