summaryrefslogtreecommitdiff
path: root/src/tui.rs
diff options
context:
space:
mode:
authorNaz <ndpm13@ch-naseem.com>2025-08-01 09:47:04 +0100
committerNaz <ndpm13@ch-naseem.com>2025-08-01 09:47:04 +0100
commit1b50c5ce06d2356124991fa48e6881f61f646ca3 (patch)
treee291498bc9b03d16ba16ecb882f7724d57853eb3 /src/tui.rs
parent180fe06facf1f8b4796df69a42596643990b9d32 (diff)
🐛fix: exit with non-zero status when error occurs
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)
}