From 7f2c2ff2293a7173a0fe90cdcc4533807b8a2f7e Mon Sep 17 00:00:00 2001 From: Lucas Meurer Date: Wed, 23 Oct 2024 15:26:19 +0200 Subject: [PATCH] Fix lints and test_shrink --- crates/egui_demo_lib/src/demo/widget_gallery.rs | 2 +- crates/egui_demo_lib/src/rendering_test.rs | 6 ++---- crates/egui_kittest/tests/snapshots/test_shrink.png | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/crates/egui_demo_lib/src/demo/widget_gallery.rs b/crates/egui_demo_lib/src/demo/widget_gallery.rs index 5dfe27d3c1b..737dbc38d03 100644 --- a/crates/egui_demo_lib/src/demo/widget_gallery.rs +++ b/crates/egui_demo_lib/src/demo/widget_gallery.rs @@ -290,7 +290,7 @@ fn doc_link_label_with_crate<'a>( mod tests { use super::*; use crate::View; - use egui::{CentralPanel, Context, Vec2}; + use egui::Vec2; use egui_kittest::Harness; #[test] diff --git a/crates/egui_demo_lib/src/rendering_test.rs b/crates/egui_demo_lib/src/rendering_test.rs index a5a8dde7c99..680f842dd57 100644 --- a/crates/egui_demo_lib/src/rendering_test.rs +++ b/crates/egui_demo_lib/src/rendering_test.rs @@ -699,14 +699,12 @@ mod tests { harness.fit_contents(); - let result = harness.try_wgpu_snapshot(&format!("rendering_test/dpi_{:.2}", dpi)); + let result = harness.try_wgpu_snapshot(&format!("rendering_test/dpi_{dpi:.2}")); if let Err(err) = result { errors.push(err); } } - if !errors.is_empty() { - panic!("Errors: {:#?}", errors); - } + assert!(errors.is_empty(), "Errors: {errors:#?}"); } } diff --git a/crates/egui_kittest/tests/snapshots/test_shrink.png b/crates/egui_kittest/tests/snapshots/test_shrink.png index 25dbe1172b1..cbca98e2150 100644 --- a/crates/egui_kittest/tests/snapshots/test_shrink.png +++ b/crates/egui_kittest/tests/snapshots/test_shrink.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d03cf541a9e281bae54de648ddb43faffb054e6472ce56387ca720dd81ef905a -size 13640 +oid sha256:12f687a49cad1f9cb2d590b1e1412759f71556a1de13f30f39098ae2394055ae +size 2837