diff --git a/src/write.rs b/src/write.rs index 9e9571a5..8f55cd72 100644 --- a/src/write.rs +++ b/src/write.rs @@ -173,7 +173,7 @@ impl arbitrary::Arbitrary<'_> for FileOptions { let level = u.int_in_range(0..=265)?; options.compression_level = Some(level); #[cfg(feature = "deflate-zopfli")] - if level > Compression::best().level() { + if level > Compression::best().level().try_into().unwrap() { options.zopfli_buffer_size = Some(1 << u.int_in_range(9..=30)?); } }