Shorter `Debug` formatting of `LayerId`
This commit is contained in:
parent
ba060a2c87
commit
9aae14cdf4
|
|
@ -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)]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue