Skip to content

Commit

Permalink
Hide "AutoCorrect spend time" info when --quiet is set. (#194)
Browse files Browse the repository at this point in the history
Fix #187
  • Loading branch information
huacnlee authored May 20, 2024
1 parent aaeb93b commit 2461b27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autocorrect-cli/src/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ pub fn err(cli: &Cli) {
}

/// print time spend from start_t to now
pub fn finish(_cli: &Cli, start_t: SystemTime) {
pub fn finish(cli: &Cli, start_t: SystemTime) {
if cli.quiet || !cli.formatter.is_diff() {
return;
}

log::info!(
"AutoCorrect spend time: {}\n",
format!("{}ms", start_t.elapsed_millis()).bright_black()
Expand Down

0 comments on commit 2461b27

Please sign in to comment.