summaryrefslogtreecommitdiff
path: root/src/tui.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tui.rs')
-rw-r--r--src/tui.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tui.rs b/src/tui.rs
index df3504d..2b0a5fd 100644
--- a/src/tui.rs
+++ b/src/tui.rs
@@ -1,14 +1,15 @@
use indicatif::{ProgressBar, ProgressStyle};
-pub fn make_progress_bar(size: u64) -> ProgressBar {
+use crate::Result;
+
+pub fn make_progress_bar(size: u64) -> Result<ProgressBar> {
let bar = ProgressBar::new(size);
bar.set_style(
ProgressStyle::with_template(
"{elapsed_precise:.white.dim} {wide_bar:.cyan} {bytes}/{total_bytes} ({bytes_per_sec}, {eta})",
- )
- .unwrap()
+ )?
.progress_chars("█▉▊▋▌▍▎▏ "),
);
- bar
+ Ok(bar)
}