Rewrite Cellbuffer Debug impl

jmap-eventsource
Manos Pitsidianakis 2021-01-05 13:50:23 +02:00
parent db69349251
commit ccc083cf88
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 10 additions and 7 deletions

View File

@ -71,13 +71,16 @@ pub struct CellBuffer {
impl fmt::Debug for CellBuffer { impl fmt::Debug for CellBuffer {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!( f.debug_struct("CellBuffer")
f, .field("cols", &self.cols)
"CellBuffer {{ cols: {}, rows: {}, buf: {} cells", .field("rows", &self.rows)
self.cols, .field("buf cells", &self.buf.len())
self.rows, .field("default_cell", &self.default_cell)
self.buf.len() .field("ascii_drawing", &self.ascii_drawing)
) .field("growable", &self.growable)
.field("tag_table", &self.tag_table)
.field("tag_associations", &self.tag_associations)
.finish()
} }
} }