From 80388c042bd1c0048fccf1cf739486642969b8a7 Mon Sep 17 00:00:00 2001 From: Kazuki Matsuo Date: Sat, 16 Mar 2024 13:56:34 +0900 Subject: [PATCH] fix(verify): show stdout of the last line --- src/verify.rs | 9 +++++++++ 1 file changed, 9 insertions(+) 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(()) }