From 3c6b04c07cf2fba88be3448a81c57a9596db1a52 Mon Sep 17 00:00:00 2001 From: c Date: Thu, 12 Sep 2024 14:12:21 +0200 Subject: [PATCH] fix panic for empty table in list --- src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 76b674e..49793d0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1801,13 +1801,9 @@ fn render_table_tree( .saturating_sub(1) }; - if table_width == 0 { - return Ok(TreeMapResult::Nothing); - } - renderer.start_block()?; - if renderer.options.draw_borders { + if table_width != 0 && renderer.options.draw_borders { renderer.add_horizontal_border_width(table_width)?; }