Skip to content

Commit

Permalink
Use pos for finished progress bar per_sec instead of len
Browse files Browse the repository at this point in the history
  • Loading branch information
DanGonite57 authored and djc committed Jan 4, 2024
1 parent 9f99ad5 commit 2a8b2ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,7 @@ impl ProgressState {
if let Status::InProgress = self.status {
self.est.steps_per_second(Instant::now())
} else {
let len = self.len.unwrap_or_else(|| self.pos());
len as f64 / self.started.elapsed().as_secs_f64()
self.pos() as f64 / self.started.elapsed().as_secs_f64()
}
}

Expand Down

0 comments on commit 2a8b2ea

Please sign in to comment.