Fix compilation
This commit is contained in:
parent
2c7f0a8f48
commit
dcf7d2115f
2 changed files with 4 additions and 4 deletions
|
|
@ -113,7 +113,7 @@ impl Deflater for BufferedZopfliDeflater {
|
|||
Ok(out.into_inner())
|
||||
})();
|
||||
let out = out.map_err(|e| PngError::new(&e.to_string()))?;
|
||||
if max_size.get().is_some_and(|max| max < out.len()) {
|
||||
if max_size.get().map(|max| max < out.len()).unwrap_or(false) {
|
||||
Err(PngError::DeflatedDataTooLong(out.len()))
|
||||
} else {
|
||||
Ok(out)
|
||||
|
|
|
|||
|
|
@ -592,8 +592,8 @@ fn optimize_png(
|
|||
raw.clone(),
|
||||
&opts,
|
||||
deadline.clone(),
|
||||
max_siz,
|
||||
&opts.deflatee,
|
||||
max_size,
|
||||
&opts.deflate,
|
||||
) {
|
||||
png.raw = new_png.raw;
|
||||
png.idat_data = new_png.idat_data;
|
||||
|
|
@ -867,7 +867,7 @@ fn report_format(prefix: &str, png: &PngImage) {
|
|||
}
|
||||
|
||||
/// Perform cleanup of certain chunks from the `PngData` object, after optimization has been completed
|
||||
fn postprocess_chunks(
|
||||
fn postprocess_chunks<T>(
|
||||
png: &mut PngData,
|
||||
opts: &Options,
|
||||
deadline: Arc<Deadline>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue