1
0
Fork 0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-05-27 18:16:10 +02:00

fix(verify): show stdout of the last line

This commit is contained in:
Kazuki Matsuo 2024-03-16 13:56:34 +09:00
parent c723bcd594
commit 80388c042b
No known key found for this signature in database

View File

@ -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(())
}