diff --git a/examples/download.rs b/examples/download.rs index beb629ce..85ca6884 100644 --- a/examples/download.rs +++ b/examples/download.rs @@ -11,6 +11,7 @@ fn main() { let pb = ProgressBar::new(total_size); pb.set_style(ProgressStyle::default_bar() .template("{spinner:.green} [{elapsed_precise}] [{wide_bar:.cyan/blue}] {bytes}/{total_bytes} ({eta})") + .with_key("eta", |state| format!("{:.1}s", state.eta().as_secs_f64())) .progress_chars("#>-")); while downloaded < total_size {