mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Only update snapshot if we didn't pass (#7455)
* Closes https://github.com/emilk/egui/issues/7449
This commit is contained in:
@@ -412,13 +412,13 @@ fn try_image_snapshot_options_impl(
|
|||||||
err,
|
err,
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
if num_wrong_pixels as i64 <= *failed_pixel_count_threshold as i64 {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
if should_update_snapshots() {
|
if should_update_snapshots() {
|
||||||
update_snapshot()
|
update_snapshot()
|
||||||
} else {
|
} else {
|
||||||
if num_wrong_pixels as i64 <= *failed_pixel_count_threshold as i64 {
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
|
|
||||||
Err(SnapshotError::Diff {
|
Err(SnapshotError::Diff {
|
||||||
name,
|
name,
|
||||||
diff: num_wrong_pixels,
|
diff: num_wrong_pixels,
|
||||||
|
|||||||
Reference in New Issue
Block a user