From ce7448a14aa7fbb4e494d4d7a1fc7324646430b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= Date: Thu, 28 Sep 2023 12:13:15 +0200 Subject: [PATCH] chore(deps): adapt to Zopfli v0.8.0 API changes --- packages/packsquash/src/squash_zip.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/packsquash/src/squash_zip.rs b/packages/packsquash/src/squash_zip.rs index f4c15b704..b61ae04bf 100644 --- a/packages/packsquash/src/squash_zip.rs +++ b/packages/packsquash/src/squash_zip.rs @@ -4,7 +4,7 @@ use std::{ borrow::Cow, collections::hash_map::Entry, io::{self, ErrorKind, Read, SeekFrom}, - num::{NonZeroU8, TryFromIntError}, + num::{NonZeroU64, TryFromIntError}, path::Path, string::FromUtf8Error, sync::LazyLock, @@ -750,18 +750,18 @@ impl SquashZip { processed_data_scratch_file.rewind().await?; zopfli::compress( - &zopfli::Options { - iteration_count: NonZeroU8::new( + zopfli::Options { + iteration_count: NonZeroU64::new( self.zopfli_iterations_time_model.iterations_for_data_size( processed_data_size, 1, MAXIMUM_ZOPFLI_ITERATIONS - ) + ) as u64 ) .unwrap(), ..Default::default() }, - &Format::Deflate, + Format::Deflate, &mut processed_data_scratch_file, &mut compressed_data_scratch_file )?;