From a3c4b3900b6aff923e9c1f0fafbf6cb1069def83 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 7 Nov 2020 15:36:23 +0100 Subject: Change progress bar format to be a configuration parameter. Signed-off-by: Matthias Beyer --- src/config/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/config') diff --git a/src/config/mod.rs b/src/config/mod.rs index 6d6ef8a..fbe10ff 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -19,6 +19,10 @@ pub struct NotValidatedConfiguration { #[getset(get = "pub")] repository: PathBuf, + #[serde(default = "default_progress_format")] + #[getset(get = "pub")] + progress_format: String, + #[serde(rename = "releases")] releases_directory: String, @@ -178,3 +182,6 @@ pub enum EndpointType { } +fn default_progress_format() -> String { + String::from("[{elapsed_precise}] ({percent:>3}%): {bar:40.cyan/blue} | {msg}") +} -- cgit v1.2.3