From ccc083cf886d6ca19bf0e15538bb67fdd1a68a28 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 5 Jan 2021 13:50:23 +0200 Subject: [PATCH] Rewrite Cellbuffer Debug impl --- src/terminal/cells.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/terminal/cells.rs b/src/terminal/cells.rs index 42aca4f47..ecc3ab841 100644 --- a/src/terminal/cells.rs +++ b/src/terminal/cells.rs @@ -71,13 +71,16 @@ pub struct CellBuffer { impl fmt::Debug for CellBuffer { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "CellBuffer {{ cols: {}, rows: {}, buf: {} cells", - self.cols, - self.rows, - self.buf.len() - ) + f.debug_struct("CellBuffer") + .field("cols", &self.cols) + .field("rows", &self.rows) + .field("buf cells", &self.buf.len()) + .field("default_cell", &self.default_cell) + .field("ascii_drawing", &self.ascii_drawing) + .field("growable", &self.growable) + .field("tag_table", &self.tag_table) + .field("tag_associations", &self.tag_associations) + .finish() } }