From f7b837af69b8690765c84869cb20cf38c3a3b0c5 Mon Sep 17 00:00:00 2001 From: andrews05 Date: Thu, 11 Jul 2024 07:38:34 +1200 Subject: [PATCH] Allow sanity-checks without parallel (#634) This adds the use of the rayon shim when parallel is not enabled. See #632. --- src/sanity_checks.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sanity_checks.rs b/src/sanity_checks.rs index c8b9524a..9c0f71ea 100644 --- a/src/sanity_checks.rs +++ b/src/sanity_checks.rs @@ -2,6 +2,9 @@ use image::{codecs::png::PngDecoder, *}; use log::{error, warn}; use std::io::Cursor; +#[cfg(not(feature = "parallel"))] +use crate::rayon; + /// Validate that the output png data still matches the original image pub fn validate_output(output: &[u8], original_data: &[u8]) -> bool { let (old_frames, new_frames) = rayon::join(