Add no-progress-bars feature so other packages can hide them (#66)
This commit is contained in:
@@ -181,7 +181,12 @@ impl<'a> Compressor<'a> {
|
||||
panic!("Can only call `create_new_tree` once");
|
||||
}
|
||||
|
||||
let pb = ProgressBar::new(self.original_state_map.len() as u64);
|
||||
let pb: ProgressBar;
|
||||
if cfg!(feature = "no-progress-bars") {
|
||||
pb = ProgressBar::hidden();
|
||||
} else {
|
||||
pb = ProgressBar::new(self.original_state_map.len() as u64);
|
||||
}
|
||||
pb.set_style(
|
||||
ProgressStyle::default_bar().template("[{elapsed_precise}] {bar} {pos}/{len} {msg}"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user