Skip to content

Commit

Permalink
Allow sanity-checks without parallel (#634)
Browse files Browse the repository at this point in the history
This adds the use of the rayon shim when parallel is not enabled. See
#632.
  • Loading branch information
andrews05 authored Jul 10, 2024
1 parent f6e3614 commit f7b837a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sanity_checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f7b837a

Please sign in to comment.