mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Shorter Debug formatting of LayerId
This commit is contained in:
@@ -60,7 +60,7 @@ impl Order {
|
|||||||
|
|
||||||
/// An identifier for a paint layer.
|
/// An identifier for a paint layer.
|
||||||
/// Also acts as an identifier for [`crate::Area`]:s.
|
/// 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))]
|
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||||
pub struct LayerId {
|
pub struct LayerId {
|
||||||
pub order: Order,
|
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`].
|
/// A unique identifier of a specific [`Shape`] in a [`PaintList`].
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||||
|
|||||||
Reference in New Issue
Block a user