Allow sanity-checks without parallel (#634)

This adds the use of the rayon shim when parallel is not enabled. See
#632.
This commit is contained in:
andrews05 2024-07-11 07:38:34 +12:00 committed by GitHub
parent f6e3614fe9
commit f7b837af69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(