From 3fbac883f347c01c9a4ee6b81a122f36605a9027 Mon Sep 17 00:00:00 2001 From: Andrew Chambers Date: Wed, 16 Mar 2022 16:58:10 +1300 Subject: [PATCH] Add ProgressBar.style(). --- src/progress_bar.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/progress_bar.rs b/src/progress_bar.rs index 44fc1a79..f16fbfa5 100644 --- a/src/progress_bar.rs +++ b/src/progress_bar.rs @@ -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();