clippy, stop getting in my way, first warning

This commit is contained in:
Abraham Toriz 2022-08-30 09:33:39 -04:00
parent dd40c1acc8
commit 2ed3f84454
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
use std::io::Write;
use std::fmt::Write as _;
use std::collections::HashMap;
use crate::tabulate::{Tabulate, Col, Align::*};
@ -144,9 +145,9 @@ pub fn print_formatted<W: Write>(entries: Vec<Entry>, out: &mut W, facts: &Facts
if greens < daily_goal_blocks {
// print the missing blocks in gray
out.push_str(&Style::new().on(White).paint(" ".repeat(daily_goal_blocks - greens)));
write!(&mut out, "{}", Style::new().on(White).paint(" ".repeat(daily_goal_blocks - greens))).unwrap();
} else if total_blocks > daily_goal_blocks {
out.push_str(&Style::new().on(Fixed(10)).paint(" ".repeat(total_blocks - daily_goal_blocks)));
write!(&mut out, "{}", Style::new().on(Fixed(10)).paint(" ".repeat(total_blocks - daily_goal_blocks))).unwrap();
}
out