mirror of
https://github.com/rust-lang/rustlings
synced 2024-11-16 12:12:54 +00:00
Merge pull request #1899 from kazu728/fix-verify-stdout-buffering
show stdout of the final line
This commit is contained in:
commit
32d2c38aa2
@ -38,6 +38,15 @@ pub fn verify<'a>(
|
||||
percentage += 100.0 / total as f32;
|
||||
bar.inc(1);
|
||||
bar.set_message(format!("({:.1} %)", percentage));
|
||||
if bar.position() == total as u64 {
|
||||
println!(
|
||||
"Progress: You completed {} / {} exercises ({:.1} %).",
|
||||
bar.position(),
|
||||
total,
|
||||
percentage
|
||||
);
|
||||
bar.finish();
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user