We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
BzEncoder::new
Compression::none
-2
While I was fuzzying my project I noticed that BzEncoder does not accept Compression::none(), although the documentation mentions 0 as a valid value.
BzEncoder
Compression::none()
Here is the code to reproduce the error.
use bzip2::write::BzEncoder; use bzip2::Compression; fn main() { let mut _encoder = BzEncoder::new(Vec::new(), Compression::none()); }
And here is the output.
thread 'main' panicked at /src/index.crates.io-6f17d22bba15001f/bzip2-0.4.4/src/mem.rs:123:13: assertion `left == right` failed left: -2 right: 0 stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: core::panicking::assert_failed_inner 3: core::panicking::assert_failed at /tmp/guix-build-rust-1.80.0.drv-0/rustc-1.80.0-src/library/core/src/panicking.rs:363:5 4: bzip2::mem::Compress::new at /src/index.crates.io-6f17d22bba15001f/bzip2-0.4.4/src/mem.rs:123:13 5: bzip2::write::BzEncoder<W>::new at /src/index.crates.io-6f17d22bba15001f/bzip2-0.4.4/src/write.rs:36:19 6: bzip_test::main at ./src/main.rs:5:24 7: core::ops::function::FnOnce::call_once at /tmp/guix-build-rust-1.80.0.drv-0/rustc-1.80.0-src/library/core/src/ops/function.rs:250:5
So, either the documentation or the code is wrong 😃
The text was updated successfully, but these errors were encountered:
Compression::new
Successfully merging a pull request may close this issue.
While I was fuzzying my project I noticed that
BzEncoder
does not acceptCompression::none()
, although the documentation mentions 0 as a valid value.Here is the code to reproduce the error.
And here is the output.
So, either the documentation or the code is wrong 😃
The text was updated successfully, but these errors were encountered: