From 6802a4ee2109b12167e83a44997ff3b5cb292598 Mon Sep 17 00:00:00 2001 From: Maxim Zhiburt Date: Sat, 9 Jul 2022 01:00:01 +0300 Subject: [PATCH] nu-table: Remove a error prone assertion (#5993) --- crates/nu-table/src/table.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/crates/nu-table/src/table.rs b/crates/nu-table/src/table.rs index 0724faac25..2b94ba95d2 100644 --- a/crates/nu-table/src/table.rs +++ b/crates/nu-table/src/table.rs @@ -57,18 +57,7 @@ pub fn draw_table( let table = build_table(data, headers, Some(alignments), config, with_footer); let table = load_theme(table, color_hm, theme, with_footer, with_header); - print_table(table, termwidth) -} - -fn print_table(table: tabled::Table, term_width: usize) -> Option { - let s = table.to_string(); - - let width = s.lines().next().map(papergrid::string_width).unwrap_or(0); - if width > term_width { - return None; - } - - Some(s) + Some(table.to_string()) } fn build_alignment_map(data: &[Vec]) -> Vec> {