Small improvements to showing progress

This commit is contained in:
mo8it
2024-10-14 00:42:49 +02:00
parent 396ee4d618
commit 8cac21511c
3 changed files with 27 additions and 18 deletions
+3 -1
View File
@@ -151,13 +151,15 @@ fn main() -> Result<ExitCode> {
app_state.set_current_exercise_ind(first_pending_exercise_ind)?;
}
stdout.write_all(b"\n\n")?;
let pending = app_state.n_pending();
if pending == 1 {
stdout.write_all(b"One exercise pending: ")?;
} else {
write!(
stdout,
"{pending}/{} exercises are pending. The first: ",
"{pending}/{} exercises pending. The first: ",
app_state.exercises().len(),
)?;
}