summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-11-07 15:36:23 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-11-07 17:34:00 +0100
commita3c4b3900b6aff923e9c1f0fafbf6cb1069def83 (patch)
treea68824c30badc8dbdd72736fc87676faec710ecd /src/config
parent995baa4b74fe64679d408ec87efce6632af6c0d9 (diff)
Change progress bar format to be a configuration parameter.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/config')
-rw-r--r--src/config/mod.rs7
1 files changed, 7 insertions, 0 deletions
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}")
+}