From a7f5fb35b3550d61be39173c36645a8e609ac8cc Mon Sep 17 00:00:00 2001 From: Lucas Meurer Date: Fri, 21 Aug 2026 11:53:33 +0200 Subject: [PATCH] Fixes --- crates/egui/src/theme/style_provider.rs | 2 +- crates/egui/src/theme/themes.rs | 7 ++++++- crates/egui/src/widget_style/classes.rs | 2 +- crates/egui/src/widget_style/mod.rs | 4 ++-- .../tests/snapshots/demos/Dancing Strings.png | 4 ++-- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/crates/egui/src/theme/style_provider.rs b/crates/egui/src/theme/style_provider.rs index fd38902c7..5f9205a85 100644 --- a/crates/egui/src/theme/style_provider.rs +++ b/crates/egui/src/theme/style_provider.rs @@ -1,4 +1,4 @@ -use std::any::TypeId; +use core::any::TypeId; use crate::widget_style::StyleArgs; diff --git a/crates/egui/src/theme/themes.rs b/crates/egui/src/theme/themes.rs index e2e419b1b..4294f9460 100644 --- a/crates/egui/src/theme/themes.rs +++ b/crates/egui/src/theme/themes.rs @@ -86,6 +86,11 @@ impl Themes { pub fn get(&self) -> ThemeWrap { let v = self.themes.get_temp::>(Id::NULL); - v.unwrap_or_else(|| panic!("A style should be set for {:?}", std::any::type_name::())) + v.unwrap_or_else(|| { + panic!( + "A style should be set for {:?}", + core::any::type_name::() + ) + }) } } diff --git a/crates/egui/src/widget_style/classes.rs b/crates/egui/src/widget_style/classes.rs index a63598e4d..95ef43aae 100644 --- a/crates/egui/src/widget_style/classes.rs +++ b/crates/egui/src/widget_style/classes.rs @@ -42,7 +42,7 @@ impl HasClasses for Classes { } } -impl std::fmt::Display for Classes { +impl core::fmt::Display for Classes { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.classes.iter().for_each(|class| { let _ = f.write_str(class.as_str()); diff --git a/crates/egui/src/widget_style/mod.rs b/crates/egui/src/widget_style/mod.rs index e4bfd3335..1a2c19959 100644 --- a/crates/egui/src/widget_style/mod.rs +++ b/crates/egui/src/widget_style/mod.rs @@ -6,7 +6,7 @@ mod classes; pub use self::classes::{ClassName, Classes, HasClasses, ROOT_CLASS, SELECTED_CLASS}; -use std::fmt::Debug; +use core::fmt::Debug; use epaint::{Color32, FontId, Stroke, text::TextWrapMode}; @@ -16,7 +16,7 @@ use crate::{ }; /// Each dedicated style must implement this trait to be used in the theme plugin system -pub trait WidgetStyle: Debug + Clone + Send + Sync + std::any::Any + 'static {} +pub trait WidgetStyle: Debug + Clone + Send + Sync + core::any::Any + 'static {} /// General text style #[derive(Debug, Clone)] diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Dancing Strings.png b/crates/egui_demo_lib/tests/snapshots/demos/Dancing Strings.png index ec34487f1..0127f54f8 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Dancing Strings.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Dancing Strings.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05527c073b1ee2f6a15052a9097d1ad515331ff32d572cf510086f9ebb7a7bbc -size 27253 +oid sha256:391d5664dbb4925bb5deb765482da613795ca25eda099b3f29df3b4faf00eb01 +size 28657