Using println() with a new line at the beginning of the message trigger some artifacts, see below:
newline_artifact.rs
use indicatif::ProgressBar;
fn main() {
let pb = ProgressBar::new(1024);
pb.inc(1);
pb.println("\nShould be a new line before this message and no duplicate progress bar");
pb.finish_with_message("done");
}
Output on main:
Output with this patch:
Using println() with an empty string does not trigger new line:
empty_msg.rs
use indicatif::ProgressBar;
fn main() {
let pb = ProgressBar::new(1024);
pb.inc(1);
pb.println("");
pb.println("There should an empty line before this message");
pb.finish_with_message("done");
}
Using
println()
with a new line at the beginning of the message trigger some artifacts, see below:newline_artifact.rs
Output on
main
: Output with this patch:Using
println()
with an empty string does not trigger new line:empty_msg.rs
Output on
main
:Output with this patch:
New test in
render.rs
showcase both issue