summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKazuki Matsuo <kazuki.matsuo.728@gmail.com>2024-03-16 13:56:34 +0900
committerKazuki Matsuo <kazuki.matsuo.728@gmail.com>2024-03-16 13:56:34 +0900
commit80388c042bd1c0048fccf1cf739486642969b8a7 (patch)
tree5f32c336feec1b58022c146a92b7ee097564181e /src
parentc723bcd594f4998caaf009670123b2aae741a177 (diff)
fix(verify): show stdout of the last line
Diffstat (limited to 'src')
-rw-r--r--src/verify.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/verify.rs b/src/verify.rs
index 8a2ad49..aee2afa 100644
--- a/src/verify.rs
+++ b/src/verify.rs
@@ -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(())
}