diff --git a/crates/egui/src/layers.rs b/crates/egui/src/layers.rs index 595f67034f5..1133f13a97b 100644 --- a/crates/egui/src/layers.rs +++ b/crates/egui/src/layers.rs @@ -60,7 +60,7 @@ impl Order { /// An identifier for a paint layer. /// Also acts as an identifier for [`crate::Area`]:s. -#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq)] +#[derive(Clone, Copy, Hash, Eq, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub struct LayerId { pub order: Order, @@ -102,6 +102,13 @@ impl LayerId { } } +impl std::fmt::Debug for LayerId { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let Self { order, id } = self; + write!(f, "LayerId {{ {order:?} {id:?} }}") + } +} + /// A unique identifier of a specific [`Shape`] in a [`PaintList`]. #[derive(Clone, Copy, Debug, PartialEq, Eq)]