fix: clippy fixes caused the lose of color

This commit is contained in:
iff 2023-07-30 18:58:14 +02:00
parent 334bd88b03
commit af17b2b464
2 changed files with 4 additions and 4 deletions

View file

@ -15,9 +15,11 @@ pub fn highlight_difference(corrected_command: &str, last_command: &str) -> Stri
}
}
if changed {
highlighted_command.push_str(&new.red().bold());
let colored = new.red().bold();
highlighted_command = format!("{}{}", highlighted_command, colored);
} else {
highlighted_command.push_str(&new.green());
let colored = new.green();
highlighted_command = format!("{}{}", highlighted_command, colored);
}
highlighted_command.push(' ');
}