diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-09-26 12:24:24 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-09-26 12:24:24 +0200 |
| commit | a493b9533a894b23fd33b307495919faee1c4a14 (patch) | |
| tree | 8f0a5ec91a7236376af3b2267680a22adb924e57 /src/layout/tree.rs | |
| parent | 72eb243e269fc74c9e59341e384ec3667c7848bf (diff) | |
More useful `Debug` impls
Diffstat (limited to 'src/layout/tree.rs')
| -rw-r--r-- | src/layout/tree.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/layout/tree.rs b/src/layout/tree.rs index 36d0ac25..3b7c4937 100644 --- a/src/layout/tree.rs +++ b/src/layout/tree.rs @@ -10,7 +10,6 @@ use { }; /// A tree of layout nodes. -#[derive(Debug)] pub struct LayoutTree { /// Runs of pages with the same properties. pub runs: Vec<PageRun>, @@ -23,6 +22,12 @@ impl LayoutTree { } } +impl Debug for LayoutTree { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { + f.debug_list().entries(&self.runs).finish() + } +} + /// A run of pages that all have the same properties. #[derive(Debug)] pub struct PageRun { |
