summaryrefslogtreecommitdiff
path: root/src/frame.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-02-07 14:19:13 +0100
committerLaurenz <laurmaedje@gmail.com>2022-02-07 14:19:13 +0100
commit9730e785a885a4ab5fcc52ce705298654f82f9c2 (patch)
treefcc6c09caf473ad5845f12805d5c914a43f890e2 /src/frame.rs
parent5d05c3f68a32c4214661a6807a5358865f54f0af (diff)
Tidy up
Diffstat (limited to 'src/frame.rs')
-rw-r--r--src/frame.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/frame.rs b/src/frame.rs
index f228fe56..7cc564cc 100644
--- a/src/frame.rs
+++ b/src/frame.rs
@@ -127,18 +127,17 @@ impl Frame {
impl Debug for Frame {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
- struct Children<'a>(&'a [(Point, Element)]);
-
- impl Debug for Children<'_> {
- fn fmt(&self, f: &mut Formatter) -> fmt::Result {
- f.debug_map().entries(self.0.iter().map(|(k, v)| (k, v))).finish()
- }
- }
-
f.debug_struct("Frame")
.field("size", &self.size)
.field("baseline", &self.baseline)
- .field("children", &Children(&self.elements))
+ .field(
+ "children",
+ &crate::util::debug(|f| {
+ f.debug_map()
+ .entries(self.elements.iter().map(|(k, v)| (k, v)))
+ .finish()
+ }),
+ )
.finish()
}
}