Fix: excess whitespace in certain cases

This commit is contained in:
DuckDuckWhale 2020-11-27 02:27:06 -08:00
parent 29928aa763
commit 5a147db4c5

View File

@ -66,7 +66,7 @@ fn main() {
times.len(), times.len(),
if times.is_empty() { '.' } else { ':' } if times.is_empty() { '.' } else { ':' }
); );
if let Some(max_title_len) = times.iter().map(|(_, title)| title.len()).max() { if let Some(max_title_len) = times.iter().map(|(_, title)| title.width()).max() {
let max_len = max_title_len + 2; let max_len = max_title_len + 2;
println!("┌──────────┬{}", "".repeat(max_len)); println!("┌──────────┬{}", "".repeat(max_len));
for (time, title) in times { for (time, title) in times {