add comment to the pregress bar suspension.

This commit is contained in:
Moïse Valvassori
2022-11-29 22:54:07 +01:00
committed by Sylvestre Ledru
parent 1b004053ac
commit 8b30ead588
+1
View File
@@ -1351,6 +1351,7 @@ fn copy_file(
if options.verbose {
if let Some(pb) = progress_bar {
// Suspend (hide) the progress bar so the println won't overlap with the progress bar.
pb.suspend(|| {
println!("{}", context_for(source, dest));
});