We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 611d629 commit 0ffeb14Copy full SHA for 0ffeb14
1 file changed
src/term.rs
@@ -227,14 +227,13 @@ pub fn progress_bar<'a>(
227
228
if filled < width {
229
stdout.write_all(b">")?;
230
- }
231
232
- let width_minus_filled = width - filled;
233
- if width_minus_filled > 1 {
234
- let red_part_width = width_minus_filled - 1;
235
- stdout.queue(SetForegroundColor(Color::Red))?;
236
- for _ in 0..red_part_width {
237
- stdout.write_all(b"-")?;
+ let width_minus_filled = width - filled;
+ if width_minus_filled > 1 {
+ stdout.queue(SetForegroundColor(Color::Red))?;
+ for _ in 1..width_minus_filled {
+ stdout.write_all(b"-")?;
+ }
238
}
239
240
0 commit comments