From 6ec619d78ae1cb4eb50863d0cd7b9a0b60f956e9 Mon Sep 17 00:00:00 2001 From: Chris Hennick Date: Sat, 27 May 2023 17:30:50 -0700 Subject: [PATCH] Bug fix --- src/write.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)?); } }