summaryrefslogtreecommitdiff
path: root/src/tui.rs
diff options
context:
space:
mode:
authorNaz <ndpm13@ch-naseem.com>2025-08-03 10:08:45 +0100
committerNaz <ndpm13@ch-naseem.com>2025-08-03 10:08:45 +0100
commit57ffe6ff51a8f3ccc41607f18dcf3c9039e85d94 (patch)
tree7ab8e10bf2fce88ca3cdfb2a6b13c0717c638407 /src/tui.rs
parent6b3f5d37fbce2e880a454e66d8fbd78269f1c867 (diff)
parentdc0ee6ce99a0480b7a6c228492936b16ceaf60cd (diff)
Merge pull request 'Add comprehensive error types' (#12) from feat/issue-5 into main
Reviewed-on: https://git.ch-naseem.com/ndpm13/zap-rs/pulls/12
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)
}