diff --git a/crates/egui_kittest/src/snapshot.rs b/crates/egui_kittest/src/snapshot.rs index 8a457ec52..e9b25a576 100644 --- a/crates/egui_kittest/src/snapshot.rs +++ b/crates/egui_kittest/src/snapshot.rs @@ -412,13 +412,13 @@ fn try_image_snapshot_options_impl( err, })?; + if num_wrong_pixels as i64 <= *failed_pixel_count_threshold as i64 { + return Ok(()); + } + if should_update_snapshots() { update_snapshot() } else { - if num_wrong_pixels as i64 <= *failed_pixel_count_threshold as i64 { - return Ok(()); - } - Err(SnapshotError::Diff { name, diff: num_wrong_pixels,