Better progress API

Percentage is a UI concern, the physical fact here is fraction. It's
sad that percentage bleeds into the protocol level, we even duplicated
this bad API ourselves!
This commit is contained in:
Aleksey Kladov
2020-10-07 12:15:37 +02:00
parent 67c76c35a3
commit 6219142c96
2 changed files with 9 additions and 4 deletions

View File

@@ -230,7 +230,7 @@ impl GlobalState {
"roots scanned",
state,
Some(format!("{}/{}", n_done, n_total)),
Some(Progress::percentage(n_done, n_total)),
Some(Progress::fraction(n_done, n_total)),
)
}
}