Skip to content

Commit

Permalink
fix ProgressState::duration() overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alexheretic authored and djc committed Jul 27, 2023
1 parent 91ba34e commit 257e79f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/state.rs
Expand Up @@ -293,7 +293,7 @@ impl ProgressState {
if self.len.is_none() || self.is_finished() {
return Duration::new(0, 0);
}
self.started.elapsed() + self.eta()
self.started.elapsed().saturating_add(self.eta())
}

/// The number of steps per second
Expand Down

0 comments on commit 257e79f

Please sign in to comment.