Skip to content

Commit

Permalink
Add ProgressBar.current_style().
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewchambers committed Mar 16, 2022
1 parent bac5a67 commit 31a066b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/progress_bar.rs
Expand Up @@ -54,6 +54,11 @@ impl ProgressBar {
}
}

/// Get a clone of the current progress bar style.
pub fn style(self) -> &ProgressStyle {
self.state().style.clone()
}

/// A convenience builder-like function for a progress bar with a given style
pub fn with_style(self, mut style: ProgressStyle) -> ProgressBar {
let mut state = self.state();
Expand Down

0 comments on commit 31a066b

Please sign in to comment.