commit e227605a8680844a3465328fe9335adbe58decdd
parent bb37ab76b7ed43cc6c67711453283c32aabe2e02
Author: Ember Sawady <ecs@d2evs.net>
Date: Wed, 6 Sep 2023 19:54:45 +0000
get rid of special case in module3 progress bar
no longer necessary since 0/0 isn't printed
Signed-off-by: Ember Sawady <ecs@d2evs.net>
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/cmd/hare/build/queue.ha b/cmd/hare/build/queue.ha
@@ -175,12 +175,9 @@ fn run_task(ctx: *context, jobs: *[]job, t: *task) (bool | error) = {
fn await_task(ctx: *context, jobs: *[]job) (size | void | error) = {
if (ctx.mode == output::DEFAULT && ctx.total != 0) {
- let percent = 100z;
- if (ctx.total != 0) {
- percent = ctx.completed * 100 / ctx.total;
- };
fmt::errorf("\x1b[G\x1b[2K{}/{} tasks completed ({}%)",
- ctx.completed, ctx.total, percent)?;
+ ctx.completed, ctx.total,
+ ctx.completed * 100 / ctx.total)?;
};
if (len(jobs) == 0) {
return;