From 7ee82a0e6371cb246aa536febcc715cbc35f0e6b Mon Sep 17 00:00:00 2001 From: InAnYan Date: Thu, 14 Nov 2024 14:53:49 +0200 Subject: [PATCH] Add fix --- module/core/format_tools/src/format/output_format/table.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/core/format_tools/src/format/output_format/table.rs b/module/core/format_tools/src/format/output_format/table.rs index fda684d03a..81a16fb0f2 100644 --- a/module/core/format_tools/src/format/output_format/table.rs +++ b/module/core/format_tools/src/format/output_format/table.rs @@ -250,7 +250,7 @@ impl TableOutputFormat for Table // println!( "icol : {icol} | irow : {irow} | width : {width} | cell_width : {cell_width} | slice.len() : {}", slice.len() ); let lspaces = ( width - cell_width ) / 2; - let rspaces = ( width - cell_width + 1 ) / 2 + cell_width - slice.len(); + let rspaces = ( width - cell_width + 1 ) / 2 + cell_width - slice.chars().count(); // println!( "icol : {icol} | irow : {irow} | width : {width} | cell_width : {cell_width} | lspaces : {lspaces} | rspaces : {rspaces}" );