Skip to content

Commit

Permalink
Suggested fix for console-rs#557
Browse files Browse the repository at this point in the history
  • Loading branch information
suomela committed Jul 3, 2023
1 parent fa0def0 commit cb1761a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl ProgressState {

/// The expected total duration (that is, elapsed time + expected ETA)
pub fn duration(&self) -> Duration {
if self.len.is_none() || self.is_finished() {
if self.len.is_none() {
return Duration::new(0, 0);
}
self.started.elapsed() + self.eta()
Expand Down

0 comments on commit cb1761a

Please sign in to comment.