Skip to content

Commit bfca1cd

Browse files
committed
Auto merge of #8892 - nnethercote:shrink-progress-bar, r=alexcrichton
Shrink the progress bar, to give more space after it. Because: - A big progress bar isn't necessary. Making it smaller loses some precision, but a big bar isn't that precise in the first place. If you precision you can look at the percentage or ratio figure after the progress bar anyway. - A big bar sometimes obscures important info. For the "Building" step the crate names after the progress bar are important -- they make it clear how much parallelism is in the build. If you don't see that you're getting a much worse understanding of the build process. On an 80-char wide terminal, the change looks like this. Before: ``` Building [========> ] 18/105 ``` After: ``` Building [=======================> ] 97/105: goblin, pdb, symbolic-dem... ``` On a 100-char wide terminal, it looks like this. Before: ``` Building [============================> ] 56/105: cpp_demangle(bu... ``` After: ``` Building [============> ] 56/105: byteorder, proc-macro2, pest, gimli, cpp_dema... ```
2 parents 02a3a02 + 7e780a9 commit bfca1cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cargo/util/progress.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ impl<'cfg> Progress<'cfg> {
7171
format: Format {
7272
style,
7373
max_width: n,
74-
max_print: 80,
74+
// 50 gives some space for text after the progress bar,
75+
// even on narrow (e.g. 80 char) terminals.
76+
max_print: 50,
7577
},
7678
name: name.to_string(),
7779
done: false,

0 commit comments

Comments
 (0)