Skip to content

Commit

Permalink
Fix clippy lints.
Browse files Browse the repository at this point in the history
  • Loading branch information
samwho committed Jun 13, 2023
1 parent f247b16 commit 890322d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ fn format_elapsed(seconds: f64) -> String {
}

fn print_spacer(args: &Args, last_spacer: &Instant) -> Result<()> {
let (width, _) = terminal_size::terminal_size().unwrap_or_else(|| (Width(80), Height(24)));
let (width, _) = terminal_size::terminal_size().unwrap_or((Width(80), Height(24)));
let mut dashes: usize = width.0.into();

if args.padding > 0 {
println!("{}", "\n".repeat(args.padding));
}

let now = OffsetDateTime::now_local().unwrap_or_else(|_| OffsetDateTime::now_utc());
let now = OffsetDateTime::now_local().unwrap_or(OffsetDateTime::now_utc());
let date_str = now.format(&DATE_FORMAT)?;
print!("{} ", date_str.green());
dashes -= date_str.len() + 1;
Expand Down

0 comments on commit 890322d

Please sign in to comment.