From 44544db47e7eea3c013cc0c685ec06cc8e1e385d Mon Sep 17 00:00:00 2001 From: Gerrit Viljoen Date: Tue, 14 May 2019 16:15:22 +0200 Subject: [PATCH] Refactoring. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 000ac6d..daecebb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -89,7 +89,7 @@ fn format_table_inner(data: Vec>, conf: &TableConfig) -> String { result } -fn valid(data: &Vec>, conf: &TableConfig) -> bool { +fn valid(data: &[Vec], conf: &TableConfig) -> bool { if data.len() == 0 { false } else if conf.width < 4 { @@ -149,7 +149,7 @@ fn truncate_widths(mut widths: Vec, conf: &TableConfig) -> Vec { widths } -fn format_line(row: &Vec, head: &str, delim: &str, tail: &str) -> String { +fn format_line(row: &[String], head: &str, delim: &str, tail: &str) -> String { let mut result = String::new(); result.push_str(head); for cell in row {